InjectedScriptExterns.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /*
  2. * Copyright (C) 2012 Google Inc. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are
  6. * met:
  7. *
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above
  11. * copyright notice, this list of conditions and the following disclaimer
  12. * in the documentation and/or other materials provided with the
  13. * distribution.
  14. * * Neither the name of Google Inc. nor the names of its
  15. * contributors may be used to endorse or promote products derived from
  16. * this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. // WebKit Web Facing API
  31. var console = { }
  32. /** @param {...*} vararg */
  33. console.log = function(vararg) { }
  34. /**
  35. * @constructor
  36. */
  37. function InjectedScriptHost() { }
  38. InjectedScriptHost.prototype.storageId = function(object) { }
  39. InjectedScriptHost.prototype.getInternalProperties = function(object) { }
  40. /**
  41. * @param {Function} func
  42. */
  43. InjectedScriptHost.prototype.functionDetails = function(func) { }
  44. /**
  45. * @param {*} object
  46. */
  47. InjectedScriptHost.prototype.isHTMLAllCollection = function(object) { }
  48. /**
  49. * @param {*} object
  50. */
  51. InjectedScriptHost.prototype.internalConstructorName = function(object) { }
  52. /**
  53. * @param {*} object
  54. */
  55. InjectedScriptHost.prototype.copyText = function(object) { }
  56. InjectedScriptHost.prototype.clearConsoleMessages = function() { }
  57. /**
  58. * @param {number} index
  59. */
  60. InjectedScriptHost.prototype.inspectedObject = function(index) { }
  61. /**
  62. * @param {*} object
  63. * @return {number}
  64. */
  65. InjectedScriptHost.prototype.objectId = function(object) { }
  66. /**
  67. * @param {*} object
  68. */
  69. InjectedScriptHost.prototype.releaseObjectId = function(object) { }
  70. /**
  71. * @param {*} object
  72. */
  73. InjectedScriptHost.prototype.databaseId = function(object) { }
  74. /**
  75. * @param {*} object
  76. * @param {Object} hints
  77. */
  78. InjectedScriptHost.prototype.inspect = function(object, hints) { }
  79. /**
  80. * @param {*} object
  81. */
  82. InjectedScriptHost.prototype.type = function(object) { }
  83. /**
  84. * @param {*} object
  85. */
  86. InjectedScriptHost.prototype.getEventListeners = function(object) { }
  87. /**
  88. * @param {string} expression
  89. */
  90. InjectedScriptHost.prototype.evaluate = function(expression) { }
  91. /**
  92. * @param {function(...)} fun
  93. * @param {number} scopeNumber
  94. * @param {string} variableName
  95. * @param {*} newValue
  96. */
  97. InjectedScriptHost.prototype.setFunctionVariableValue = function(fun, scopeNumber, variableName, newValue) { }
  98. /**
  99. * @constructor
  100. */
  101. function JavaScriptCallFrame()
  102. {
  103. /** @type {number} */
  104. this.sourceID;
  105. /** @type {number} */
  106. this.line;
  107. /** @type {number} */
  108. this.column;
  109. /** @type {*} */
  110. this.thisObject;
  111. }
  112. /**
  113. * @param {number} index
  114. */
  115. JavaScriptCallFrame.prototype.scopeType = function(index) { }
  116. JavaScriptCallFrame.prototype.restart = function() { }
  117. /**
  118. * @param {number} scopeNumber
  119. * @param {string} variableName
  120. * @param {*} newValue
  121. */
  122. JavaScriptCallFrame.prototype.setVariableValue = function(scopeNumber, variableName, newValue) {}
  123. /**
  124. * @constructor
  125. */
  126. function JavaScriptFunction()
  127. {
  128. /** @type {Array} */
  129. this.rawScopes;
  130. }
  131. var InspectorBackend = { };
  132. /**
  133. * @constructor
  134. */
  135. function CallSite()
  136. {
  137. }
  138. /**
  139. * @return {string}
  140. */
  141. CallSite.prototype.getFileName = function() { }
  142. /**
  143. * @return {number}
  144. */
  145. CallSite.prototype.getLineNumber = function() { }
  146. /**
  147. * @return {number}
  148. */
  149. CallSite.prototype.getColumnNumber = function() { }