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

Side by Side 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: Staying inside core 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 unified diff | Download patch
OLDNEW
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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698