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 31 /** 32 * @constructor 33 */ 34 function InjectedScriptHostClass() { } 35 InjectedScriptHostClass.prototype.storageId = function(object) { } 36 InjectedScriptHostClass.prototype.getInternalProperties = function(object) { } 37 /** 38 * @param {Function} func 39 */ 40 InjectedScriptHostClass.prototype.functionDetails = function(func) { } 41 /** 42 * @param {!Object} receiver 43 * @param {!Function} func 44 * @param {...*} args 45 */ 46 InjectedScriptHostClass.prototype.suppressWarningsAndCall = function(receiver, func, args) { } 47 /** 48 * @param {*} object 49 */ 50 InjectedScriptHostClass.prototype.isHTMLAllCollection = function(object) { } 51 /** 52 * @param {*} object 53 */ 54 InjectedScriptHostClass.prototype.internalConstructorName = function(object) { } 55 56 InjectedScriptHostClass.prototype.clearConsoleMessages = function() { } 57 /** 58 * @param {number} index 59 */ 60 InjectedScriptHostClass.prototype.inspectedObject = function(index) { } 61 /** 62 * @param {*} object 63 * @return {number} 64 */ 65 InjectedScriptHostClass.prototype.objectId = function(object) { } 66 /** 67 * @param {*} object 68 */ 69 InjectedScriptHostClass.prototype.releaseObjectId = function(object) { } 70 /** 71 * @param {*} object 72 */ 73 InjectedScriptHostClass.prototype.databaseId = function(object) { } 74 /** 75 * @param {*} object 76 * @param {Object} hints 77 */ 78 InjectedScriptHostClass.prototype.inspect = function(object, hints) { } 79 /** 80 * @param {*} object 81 */ 82 InjectedScriptHostClass.prototype.type = function(object) { } 83 /** 84 * @param {*} object 85 */ 86 InjectedScriptHostClass.prototype.getEventListeners = function(object) { } 87 /** 88 * @param {string} expression 89 */ 90 InjectedScriptHostClass.prototype.evaluate = function(expression) { } 91 /** 92 * @param {*} fn 93 */ 94 InjectedScriptHostClass.prototype.debugFunction = function(fn) { } 95 /** 96 * @param {*} fn 97 */ 98 InjectedScriptHostClass.prototype.undebugFunction = function(fn) { } 99 /** 100 * @param {*} fn 101 */ 102 InjectedScriptHostClass.prototype.monitorFunction = function(fn) { } 103 /** 104 * @param {*} fn 105 */ 106 InjectedScriptHostClass.prototype.unmonitorFunction = function(fn) { } 107 108 /** 109 * @param {function(...)} fun 110 * @param {number} scopeNumber 111 * @param {string} variableName 112 * @param {*} newValue 113 */ 114 InjectedScriptHostClass.prototype.setFunctionVariableValue = function(fun, scopeNumber, variableName, newValue) { } 115 116 /** @type {!InjectedScriptHostClass} */ 117 var InjectedScriptHost; 118 /** @type {!Window} */ 119 var inspectedWindow; 120 /** @type {number} */ 121 var injectedScriptId; 122 123 /** 124 * @constructor 125 */ 126 function JavaScriptCallFrame() 127 { 128 /** @type {number} */ 129 this.sourceID; 130 /** @type {number} */ 131 this.line; 132 /** @type {number} */ 133 this.column; 134 /** @type {*} */ 135 this.thisObject; 136 /** @type {string} */ 137 this.stepInPositions; 138 } 139 140 /** 141 * @param {number} index 142 */ 143 JavaScriptCallFrame.prototype.scopeType = function(index) { } 144 145 JavaScriptCallFrame.prototype.restart = function() { } 146 147 /** 148 * @param {number} scopeNumber 149 * @param {string} variableName 150 * @param {*} newValue 151 */ 152 JavaScriptCallFrame.prototype.setVariableValue = function(scopeNumber, variableName, newValue) {} 153 154 /** 155 * @constructor 156 */ 157 function JavaScriptFunction() 158 { 159 /** @type {Array} */ 160 this.rawScopes; 161 } 162 163 // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi 164 /** 165 * @constructor 166 */ 167 function CallSite() 168 { 169 } 170 /** 171 * @return {string} 172 */ 173 CallSite.prototype.getFileName = function() { } 174 /** 175 * @return {number} 176 */ 177 CallSite.prototype.getLineNumber = function() { } 178 /** 179 * @return {number} 180 */ 181 CallSite.prototype.getColumnNumber = function() { } 182 183 // FIXME: Remove once ES6 is supported natively by JS compiler. 184 185 /** @typedef {string} */ 186 var symbol; 187 188 /** 189 * @param {string} description 190 * @return {symbol} 191 */ 192 function Symbol(description) {} 193