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

Side by Side Diff: Source/devtools/front_end/sdk/Target.js

Issue 475803002: Make profiling lock global rather than per Target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Extracted Lock.js Created 6 years, 4 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 | Annotate | Revision Log
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 {string} name 10 * @param {string} name
(...skipping 14 matching lines...) Expand all
25 this._modelByConstructor = new Map(); 25 this._modelByConstructor = new Map();
26 26
27 /** @type {!Object.<string, boolean>} */ 27 /** @type {!Object.<string, boolean>} */
28 this._capabilities = {}; 28 this._capabilities = {};
29 this.pageAgent().canScreencast(this._initializeCapability.bind(this, WebInsp ector.Target.Capabilities.CanScreencast, null)); 29 this.pageAgent().canScreencast(this._initializeCapability.bind(this, WebInsp ector.Target.Capabilities.CanScreencast, null));
30 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) 30 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled())
31 this.powerAgent().canProfilePower(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.CanProfilePower, null)); 31 this.powerAgent().canProfilePower(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.CanProfilePower, null));
32 this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, W ebInspector.Target.Capabilities.CanInspectWorkers, this._loadedWithCapabilities. bind(this, callback))); 32 this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, W ebInspector.Target.Capabilities.CanInspectWorkers, this._loadedWithCapabilities. bind(this, callback)));
33 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) 33 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled())
34 this.consoleAgent().setTracingBasedTimeline(true); 34 this.consoleAgent().setTracingBasedTimeline(true);
35
36 /** @type {!WebInspector.Lock} */
37 this.profilingLock = new WebInspector.Lock();
38 } 35 }
39 36
40 /** 37 /**
41 * @enum {string} 38 * @enum {string}
42 */ 39 */
43 WebInspector.Target.Capabilities = { 40 WebInspector.Target.Capabilities = {
44 CanScreencast: "CanScreencast", 41 CanScreencast: "CanScreencast",
45 HasTouchInputs: "HasTouchInputs", 42 HasTouchInputs: "HasTouchInputs",
46 CanProfilePower: "CanProfilePower", 43 CanProfilePower: "CanProfilePower",
47 CanInspectWorkers: "CanInspectWorkers" 44 CanInspectWorkers: "CanInspectWorkers"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 /** 423 /**
427 * @param {!WebInspector.Target} target 424 * @param {!WebInspector.Target} target
428 */ 425 */
429 targetRemoved: function(target) { }, 426 targetRemoved: function(target) { },
430 } 427 }
431 428
432 /** 429 /**
433 * @type {!WebInspector.TargetManager} 430 * @type {!WebInspector.TargetManager}
434 */ 431 */
435 WebInspector.targetManager = new WebInspector.TargetManager(); 432 WebInspector.targetManager = new WebInspector.TargetManager();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698