Commit 287547ab authored by apavlov@chromium.org's avatar apavlov@chromium.org

DevTools: Make WI.Target.Capabilities enum values uppercase

We've got all enum values starting with an uppercase letter in our code

TBR=sergeyv

Review URL: https://codereview.chromium.org/420783002

git-svn-id: svn://svn.chromium.org/blink/trunk@178924 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a635e3e0
......@@ -40,7 +40,7 @@ WebInspector.ScreencastApp.prototype = {
*/
presentUI: function(mainTarget)
{
if (mainTarget.hasCapability(WebInspector.Target.Capabilities.canScreencast)) {
if (mainTarget.hasCapability(WebInspector.Target.Capabilities.CanScreencast)) {
this._screencastView = new WebInspector.ScreencastView(mainTarget);
this._screencastView.show(this._rootSplitView.mainElement());
this._screencastView.initialize();
......
......@@ -813,7 +813,7 @@ WebInspector.OverridesSupport.prototype = {
*/
hasTouchInputs: function()
{
return !!this._target && this._target.hasCapability(WebInspector.Target.Capabilities.hasTouchInputs);
return !!this._target && this._target.hasCapability(WebInspector.Target.Capabilities.HasTouchInputs);
},
/**
......
......@@ -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()
......
......@@ -108,13 +108,13 @@ WebInspector.TimelinePowerOverview.prototype = {
timelineStarted: function()
{
if (WebInspector.targetManager.mainTarget().hasCapability(WebInspector.Target.Capabilities.canProfilePower))
if (WebInspector.targetManager.mainTarget().hasCapability(WebInspector.Target.Capabilities.CanProfilePower))
WebInspector.powerProfiler.startProfile();
},
timelineStopped: function()
{
if (WebInspector.targetManager.mainTarget().hasCapability(WebInspector.Target.Capabilities.canProfilePower))
if (WebInspector.targetManager.mainTarget().hasCapability(WebInspector.Target.Capabilities.CanProfilePower))
WebInspector.powerProfiler.stopProfile();
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment