Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1478)

Unified Diff: Source/devtools/front_end/Target.js

Issue 243233002: [DevTools] Disable touch emulation on devices with touch input. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
}

Powered by Google App Engine
This is Rietveld 408576698