Index: Source/devtools/front_end/Target.js |
diff --git a/Source/devtools/front_end/Target.js b/Source/devtools/front_end/Target.js |
index 6d142efe38ed80e1735c58567582a87b355e6091..045b90bdd51b375f9d03d8398b053c286e7a265a 100644 |
--- a/Source/devtools/front_end/Target.js |
+++ b/Source/devtools/front_end/Target.js |
@@ -16,8 +16,18 @@ WebInspector.Target = function(connection, callback) |
this._connection = connection; |
this.isMainFrontend = false; |
+ /** |
+ * @type {boolean} |
+ */ |
+ this.canScreencast = false; |
this.pageAgent().canScreencast(this._initializeCapability.bind(this, "canScreencast", null)); |
+ /** |
+ * @type {boolean} |
+ */ |
+ this.hasTouchInputs = false; |
+ this.pageAgent().hasTouchInputs(this._initializeCapability.bind(this, "hasTouchInputs", null)); |
+ |
if (WebInspector.experimentsSettings.powerProfiler.isEnabled()) |
this.powerAgent().canProfilePower(this._initializeCapability.bind(this, "canProfilePower", null)); |
@@ -226,6 +236,18 @@ WebInspector.TargetManager.prototype = { |
activeTarget: function() |
{ |
return this._targets[0]; |
+ }, |
+ |
+ /** |
+ * @return {?WebInspector.Target} |
+ */ |
+ mainTarget: function() |
pfeldman
2014/04/18 16:23:15
Remove
dgozman
2014/04/21 11:46:11
Done.
|
+ { |
+ for (var i = 0; i < this._targets.length; ++i) { |
+ if (this._targets[i].isMainFrontend) |
dgozman
2014/04/18 15:13:12
Main target is the one with |isMainFrontend|, righ
|
+ return this._targets[i]; |
+ } |
+ return null; |
} |
} |