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 {!InspectorBackendClass.Connection} connection | 10 * @param {!InspectorBackendClass.Connection} connection |
11 * @param {function(!WebInspector.Target)=} callback | 11 * @param {function(!WebInspector.Target)=} callback |
12 */ | 12 */ |
13 WebInspector.Target = function(connection, callback) | 13 WebInspector.Target = function(connection, callback) |
14 { | 14 { |
15 Protocol.Agents.call(this, connection.agentsMap()); | 15 Protocol.Agents.call(this, connection.agentsMap()); |
16 this._connection = connection; | 16 this._connection = connection; |
17 this.isMainFrontend = false; | 17 this.isMainFrontend = false; |
18 | 18 |
| 19 /** |
| 20 * @type {boolean} |
| 21 */ |
| 22 this.canScreencast = false; |
19 this.pageAgent().canScreencast(this._initializeCapability.bind(this, "canScr
eencast", null)); | 23 this.pageAgent().canScreencast(this._initializeCapability.bind(this, "canScr
eencast", null)); |
20 | 24 |
| 25 /** |
| 26 * @type {boolean} |
| 27 */ |
| 28 this.hasTouchInputs = false; |
| 29 this.pageAgent().hasTouchInputs(this._initializeCapability.bind(this, "hasTo
uchInputs", null)); |
| 30 |
21 if (WebInspector.experimentsSettings.powerProfiler.isEnabled()) | 31 if (WebInspector.experimentsSettings.powerProfiler.isEnabled()) |
22 this.powerAgent().canProfilePower(this._initializeCapability.bind(this,
"canProfilePower", null)); | 32 this.powerAgent().canProfilePower(this._initializeCapability.bind(this,
"canProfilePower", null)); |
23 | 33 |
24 this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, "
isMainFrontend", this._loadedWithCapabilities.bind(this, callback))); | 34 this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, "
isMainFrontend", this._loadedWithCapabilities.bind(this, callback))); |
25 } | 35 } |
26 | 36 |
27 WebInspector.Target.prototype = { | 37 WebInspector.Target.prototype = { |
28 | 38 |
29 _initializeCapability: function(name, callback, error, result) | 39 _initializeCapability: function(name, callback, error, result) |
30 { | 40 { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 /** | 255 /** |
246 * @param {!WebInspector.Target} target | 256 * @param {!WebInspector.Target} target |
247 */ | 257 */ |
248 targetRemoved: function(target) { }, | 258 targetRemoved: function(target) { }, |
249 } | 259 } |
250 | 260 |
251 /** | 261 /** |
252 * @type {!WebInspector.TargetManager} | 262 * @type {!WebInspector.TargetManager} |
253 */ | 263 */ |
254 WebInspector.targetManager; | 264 WebInspector.targetManager; |
OLD | NEW |