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

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

Issue 420783002: DevTools: Make WI.Target.Capabilities enum values uppercase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/sdk/Target.js
diff --git a/Source/devtools/front_end/sdk/Target.js b/Source/devtools/front_end/sdk/Target.js
index d22f6601bdd7eb23277b34b0fa42ae860a0a2342..551e1e20e9bdb5ab535e3355b11d60039b760de3 100644
--- a/Source/devtools/front_end/sdk/Target.js
+++ b/Source/devtools/front_end/sdk/Target.js
@@ -26,11 +26,11 @@ WebInspector.Target = function(name, connection, callback)
/** @type {!Object.<string, boolean>} */
this._capabilities = {};
- this.pageAgent().canScreencast(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.canScreencast, null));
- this.pageAgent().hasTouchInputs(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.hasTouchInputs, null));
+ this.pageAgent().canScreencast(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.CanScreencast, null));
+ this.pageAgent().hasTouchInputs(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.HasTouchInputs, null));
if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled())
- this.powerAgent().canProfilePower(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.canProfilePower, null));
- this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.canInspectWorkers, this._loadedWithCapabilities.bind(this, callback)));
+ this.powerAgent().canProfilePower(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.CanProfilePower, null));
+ this.workerAgent().canInspectWorkers(this._initializeCapability.bind(this, WebInspector.Target.Capabilities.CanInspectWorkers, this._loadedWithCapabilities.bind(this, callback)));
/** @type {!WebInspector.Lock} */
this.profilingLock = new WebInspector.Lock();
@@ -40,10 +40,10 @@ WebInspector.Target = function(name, connection, callback)
* @enum {string}
*/
WebInspector.Target.Capabilities = {
- canScreencast: "canScreencast",
- hasTouchInputs: "hasTouchInputs",
- canProfilePower: "canProfilePower",
- canInspectWorkers: "canInspectWorkers"
+ CanScreencast: "CanScreencast",
+ HasTouchInputs: "HasTouchInputs",
+ CanProfilePower: "CanProfilePower",
+ CanInspectWorkers: "CanInspectWorkers"
}
WebInspector.Target._nextId = 1;
@@ -137,11 +137,11 @@ WebInspector.Target.prototype = {
WebInspector.cssModel = this.cssModel;
/** @type {!WebInspector.WorkerManager} */
- this.workerManager = new WebInspector.WorkerManager(this, this.hasCapability(WebInspector.Target.Capabilities.canInspectWorkers));
+ this.workerManager = new WebInspector.WorkerManager(this, this.hasCapability(WebInspector.Target.Capabilities.CanInspectWorkers));
if (!WebInspector.workerManager)
WebInspector.workerManager = this.workerManager;
- if (this.hasCapability(WebInspector.Target.Capabilities.canProfilePower))
+ if (this.hasCapability(WebInspector.Target.Capabilities.CanProfilePower))
WebInspector.powerProfiler = new WebInspector.PowerProfiler();
/** @type {!WebInspector.TimelineManager} */
@@ -184,7 +184,7 @@ WebInspector.Target.prototype = {
*/
isWorkerTarget: function()
{
- return !this.hasCapability(WebInspector.Target.Capabilities.canInspectWorkers);
+ return !this.hasCapability(WebInspector.Target.Capabilities.CanInspectWorkers);
},
/**
@@ -192,8 +192,8 @@ WebInspector.Target.prototype = {
*/
isMobile: function()
{
- // FIXME: either add a separate capability or rename canScreencast to isMobile.
- return this.hasCapability(WebInspector.Target.Capabilities.canScreencast);
+ // FIXME: either add a separate capability or rename CanScreencast to IsMobile.
+ return this.hasCapability(WebInspector.Target.Capabilities.CanScreencast);
},
_onDisconnect: function()
« no previous file with comments | « Source/devtools/front_end/sdk/OverridesSupport.js ('k') | Source/devtools/front_end/timeline/TimelinePowerOverview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698