| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @constructor | 8 * @constructor |
| 9 * @extends {Protocol.Agents} | 9 * @extends {Protocol.Agents} |
| 10 * @param {!WebInspector.TargetManager} targetManager | 10 * @param {!WebInspector.TargetManager} targetManager |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @enum {number} | 32 * @enum {number} |
| 33 */ | 33 */ |
| 34 WebInspector.Target.Capability = { | 34 WebInspector.Target.Capability = { |
| 35 Browser: 1, | 35 Browser: 1, |
| 36 JS: 2, | 36 JS: 2, |
| 37 Network: 4, | 37 Network: 4, |
| 38 Worker: 8, | 38 Worker: 8, |
| 39 DOM: 16 |
| 39 } | 40 } |
| 40 | 41 |
| 41 WebInspector.Target._nextId = 1; | 42 WebInspector.Target._nextId = 1; |
| 42 | 43 |
| 43 WebInspector.Target.prototype = { | 44 WebInspector.Target.prototype = { |
| 44 /** | 45 /** |
| 45 * @return {number} | 46 * @return {number} |
| 46 */ | 47 */ |
| 47 id: function() | 48 id: function() |
| 48 { | 49 { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 129 |
| 129 /** | 130 /** |
| 130 * @return {boolean} | 131 * @return {boolean} |
| 131 */ | 132 */ |
| 132 hasWorkerCapability: function() | 133 hasWorkerCapability: function() |
| 133 { | 134 { |
| 134 return this.hasAllCapabilities(WebInspector.Target.Capability.Worker); | 135 return this.hasAllCapabilities(WebInspector.Target.Capability.Worker); |
| 135 }, | 136 }, |
| 136 | 137 |
| 137 /** | 138 /** |
| 139 * @return {boolean} |
| 140 */ |
| 141 hasDOMCapability: function() |
| 142 { |
| 143 return this.hasAllCapabilities(WebInspector.Target.Capability.DOM); |
| 144 }, |
| 145 |
| 146 /** |
| 138 * @return {?WebInspector.Target} | 147 * @return {?WebInspector.Target} |
| 139 */ | 148 */ |
| 140 parentTarget: function() | 149 parentTarget: function() |
| 141 { | 150 { |
| 142 return this._parentTarget; | 151 return this._parentTarget; |
| 143 }, | 152 }, |
| 144 | 153 |
| 145 _onDisconnect: function() | 154 _onDisconnect: function() |
| 146 { | 155 { |
| 147 this._targetManager.removeTarget(this); | 156 this._targetManager.removeTarget(this); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 { | 254 { |
| 246 var target = /** @type {!WebInspector.Target} */ (event.data); | 255 var target = /** @type {!WebInspector.Target} */ (event.data); |
| 247 if (target !== this._target) | 256 if (target !== this._target) |
| 248 return; | 257 return; |
| 249 this.dispose(); | 258 this.dispose(); |
| 250 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage
r.Events.TargetDisposed, this._targetDisposed, this); | 259 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage
r.Events.TargetDisposed, this._targetDisposed, this); |
| 251 }, | 260 }, |
| 252 | 261 |
| 253 __proto__: WebInspector.SDKObject.prototype | 262 __proto__: WebInspector.SDKObject.prototype |
| 254 } | 263 } |
| OLD | NEW |