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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 /** @type {!Map.<!Function, !WebInspector.SDKModel>} */ | 28 /** @type {!Map.<!Function, !WebInspector.SDKModel>} */ |
29 this._modelByConstructor = new Map(); | 29 this._modelByConstructor = new Map(); |
30 } | 30 } |
31 | 31 |
32 /** | 32 /** |
33 * @enum {number} | 33 * @enum {number} |
34 */ | 34 */ |
35 WebInspector.Target.Capability = { | 35 WebInspector.Target.Capability = { |
36 Browser: 1, | 36 Browser: 1, |
37 JS: 2, | 37 DOM: 2, |
38 Network: 4, | 38 JS: 4, |
39 Worker: 8, | 39 Log: 8, |
40 DOM: 16 | 40 Network: 16, |
41 } | 41 Worker: 32 |
| 42 }; |
42 | 43 |
43 WebInspector.Target._nextId = 1; | 44 WebInspector.Target._nextId = 1; |
44 | 45 |
45 WebInspector.Target.prototype = { | 46 WebInspector.Target.prototype = { |
46 /** | 47 /** |
47 * @return {number} | 48 * @return {number} |
48 */ | 49 */ |
49 id: function() | 50 id: function() |
50 { | 51 { |
51 return this._id; | 52 return this._id; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 * @return {boolean} | 117 * @return {boolean} |
117 */ | 118 */ |
118 hasJSCapability: function() | 119 hasJSCapability: function() |
119 { | 120 { |
120 return this.hasAllCapabilities(WebInspector.Target.Capability.JS); | 121 return this.hasAllCapabilities(WebInspector.Target.Capability.JS); |
121 }, | 122 }, |
122 | 123 |
123 /** | 124 /** |
124 * @return {boolean} | 125 * @return {boolean} |
125 */ | 126 */ |
| 127 hasLogCapability: function() |
| 128 { |
| 129 return this.hasAllCapabilities(WebInspector.Target.Capability.Log); |
| 130 }, |
| 131 |
| 132 /** |
| 133 * @return {boolean} |
| 134 */ |
126 hasNetworkCapability: function() | 135 hasNetworkCapability: function() |
127 { | 136 { |
128 return this.hasAllCapabilities(WebInspector.Target.Capability.Network); | 137 return this.hasAllCapabilities(WebInspector.Target.Capability.Network); |
129 }, | 138 }, |
130 | 139 |
131 /** | 140 /** |
132 * @return {boolean} | 141 * @return {boolean} |
133 */ | 142 */ |
134 hasWorkerCapability: function() | 143 hasWorkerCapability: function() |
135 { | 144 { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 { | 282 { |
274 var target = /** @type {!WebInspector.Target} */ (event.data); | 283 var target = /** @type {!WebInspector.Target} */ (event.data); |
275 if (target !== this._target) | 284 if (target !== this._target) |
276 return; | 285 return; |
277 this.dispose(); | 286 this.dispose(); |
278 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage
r.Events.TargetDisposed, this._targetDisposed, this); | 287 WebInspector.targetManager.removeEventListener(WebInspector.TargetManage
r.Events.TargetDisposed, this._targetDisposed, this); |
279 }, | 288 }, |
280 | 289 |
281 __proto__: WebInspector.SDKObject.prototype | 290 __proto__: WebInspector.SDKObject.prototype |
282 } | 291 } |
OLD | NEW |