| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @extends {WebInspector.TargetAwareObject} | 33 * @extends {WebInspector.SDKObject} |
| 34 * @param {!WebInspector.Target} target | 34 * @param {!WebInspector.Target} target |
| 35 */ | 35 */ |
| 36 WebInspector.RuntimeModel = function(target) | 36 WebInspector.RuntimeModel = function(target) |
| 37 { | 37 { |
| 38 WebInspector.TargetAwareObject.call(this, target); | 38 WebInspector.SDKObject.call(this, target); |
| 39 | 39 |
| 40 this._debuggerModel = target.debuggerModel; | 40 this._debuggerModel = target.debuggerModel; |
| 41 this._agent = target.runtimeAgent(); | 41 this._agent = target.runtimeAgent(); |
| 42 this.target().registerRuntimeDispatcher(new WebInspector.RuntimeDispatcher(t
his)); | 42 this.target().registerRuntimeDispatcher(new WebInspector.RuntimeDispatcher(t
his)); |
| 43 this._agent.enable(); | 43 this._agent.enable(); |
| 44 /** | 44 /** |
| 45 * @type {!Object.<number, !WebInspector.ExecutionContext>} | 45 * @type {!Object.<number, !WebInspector.ExecutionContext>} |
| 46 */ | 46 */ |
| 47 this._executionContextById = {}; | 47 this._executionContextById = {}; |
| 48 } | 48 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 /** | 122 /** |
| 123 * @param {string} name | 123 * @param {string} name |
| 124 * @param {number|string|boolean} value | 124 * @param {number|string|boolean} value |
| 125 * @return {!WebInspector.RemoteObjectProperty} | 125 * @return {!WebInspector.RemoteObjectProperty} |
| 126 */ | 126 */ |
| 127 createRemotePropertyFromPrimitiveValue: function(name, value) | 127 createRemotePropertyFromPrimitiveValue: function(name, value) |
| 128 { | 128 { |
| 129 return new WebInspector.RemoteObjectProperty(name, this.createRemoteObje
ctFromPrimitiveValue(value)); | 129 return new WebInspector.RemoteObjectProperty(name, this.createRemoteObje
ctFromPrimitiveValue(value)); |
| 130 }, | 130 }, |
| 131 | 131 |
| 132 __proto__: WebInspector.TargetAwareObject.prototype | 132 __proto__: WebInspector.SDKObject.prototype |
| 133 } | 133 } |
| 134 | 134 |
| 135 /** | 135 /** |
| 136 * @constructor | 136 * @constructor |
| 137 * @implements {RuntimeAgent.Dispatcher} | 137 * @implements {RuntimeAgent.Dispatcher} |
| 138 * @param {!WebInspector.RuntimeModel} runtimeModel | 138 * @param {!WebInspector.RuntimeModel} runtimeModel |
| 139 */ | 139 */ |
| 140 WebInspector.RuntimeDispatcher = function(runtimeModel) | 140 WebInspector.RuntimeDispatcher = function(runtimeModel) |
| 141 { | 141 { |
| 142 this._runtimeModel = runtimeModel; | 142 this._runtimeModel = runtimeModel; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 155 | 155 |
| 156 executionContextsCleared: function() | 156 executionContextsCleared: function() |
| 157 { | 157 { |
| 158 this._runtimeModel._executionContextsCleared(); | 158 this._runtimeModel._executionContextsCleared(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } | 161 } |
| 162 | 162 |
| 163 /** | 163 /** |
| 164 * @constructor | 164 * @constructor |
| 165 * @extends {WebInspector.TargetAware} | 165 * @extends {WebInspector.SDKObject} |
| 166 * @param {!WebInspector.Target} target | 166 * @param {!WebInspector.Target} target |
| 167 * @param {number|undefined} id | 167 * @param {number|undefined} id |
| 168 * @param {string} name | 168 * @param {string} name |
| 169 * @param {boolean} isPageContext | 169 * @param {boolean} isPageContext |
| 170 * @param {string=} frameId | 170 * @param {string=} frameId |
| 171 */ | 171 */ |
| 172 WebInspector.ExecutionContext = function(target, id, name, isPageContext, frameI
d) | 172 WebInspector.ExecutionContext = function(target, id, name, isPageContext, frameI
d) |
| 173 { | 173 { |
| 174 WebInspector.TargetAware.call(this, target); | 174 WebInspector.SDKObject.call(this, target); |
| 175 this.id = id; | 175 this.id = id; |
| 176 this.name = (isPageContext && !name) ? "<page context>" : name; | 176 this.name = (isPageContext && !name) ? "<page context>" : name; |
| 177 this.isMainWorldContext = isPageContext; | 177 this.isMainWorldContext = isPageContext; |
| 178 this._debuggerModel = target.debuggerModel; | 178 this._debuggerModel = target.debuggerModel; |
| 179 this.frameId = frameId; | 179 this.frameId = frameId; |
| 180 } | 180 } |
| 181 | 181 |
| 182 /** | 182 /** |
| 183 * @param {!WebInspector.ExecutionContext} a | 183 * @param {!WebInspector.ExecutionContext} a |
| 184 * @param {!WebInspector.ExecutionContext} b | 184 * @param {!WebInspector.ExecutionContext} b |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 if (property.length < prefix.length) | 393 if (property.length < prefix.length) |
| 394 continue; | 394 continue; |
| 395 if (prefix.length && !property.startsWith(prefix)) | 395 if (prefix.length && !property.startsWith(prefix)) |
| 396 continue; | 396 continue; |
| 397 | 397 |
| 398 results.push(property); | 398 results.push(property); |
| 399 } | 399 } |
| 400 completionsReadyCallback(results); | 400 completionsReadyCallback(results); |
| 401 }, | 401 }, |
| 402 | 402 |
| 403 __proto__: WebInspector.TargetAware.prototype | 403 __proto__: WebInspector.SDKObject.prototype |
| 404 } | 404 } |
| 405 | 405 |
| 406 /** | 406 /** |
| 407 * @type {!WebInspector.RuntimeModel} | 407 * @type {!WebInspector.RuntimeModel} |
| 408 */ | 408 */ |
| 409 WebInspector.runtimeModel; | 409 WebInspector.runtimeModel; |
| OLD | NEW |