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

Unified Diff: Source/devtools/front_end/main/AdvancedApp.js

Issue 722713002: DevTools: get rid of getters and setters in StatusBarButton. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/main/AdvancedApp.js
diff --git a/Source/devtools/front_end/main/AdvancedApp.js b/Source/devtools/front_end/main/AdvancedApp.js
index be95696bc7536d9d389b17b4df4055cdc71581cf..99685a8b1529346c060bc3a0e43c195775d8114c 100644
--- a/Source/devtools/front_end/main/AdvancedApp.js
+++ b/Source/devtools/front_end/main/AdvancedApp.js
@@ -11,7 +11,7 @@ WebInspector.AdvancedApp = function()
WebInspector.App.call(this);
if (WebInspector.overridesSupport.responsiveDesignAvailable()) {
this._toggleEmulationButton = new WebInspector.StatusBarButton(WebInspector.UIString("Toggle device mode."), "emulation-status-bar-item");
- this._toggleEmulationButton.toggled = WebInspector.overridesSupport.emulationEnabled();
+ this._toggleEmulationButton.setToggled(WebInspector.overridesSupport.emulationEnabled());
this._toggleEmulationButton.addEventListener("click", this._toggleEmulationEnabled, this);
WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.EmulationStateChanged, this._emulationEnabledChanged, this);
WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
@@ -22,7 +22,7 @@ WebInspector.AdvancedApp = function()
WebInspector.AdvancedApp.prototype = {
_toggleEmulationEnabled: function()
{
- var enabled = !this._toggleEmulationButton.toggled;
+ var enabled = !this._toggleEmulationButton.toggled();
if (enabled)
WebInspector.userMetrics.DeviceModeEnabled.record();
WebInspector.overridesSupport.setEmulationEnabled(enabled);
@@ -30,7 +30,7 @@ WebInspector.AdvancedApp.prototype = {
_emulationEnabledChanged: function()
{
- this._toggleEmulationButton.toggled = WebInspector.overridesSupport.emulationEnabled();
+ this._toggleEmulationButton.setToggled(WebInspector.overridesSupport.emulationEnabled());
if (!WebInspector.overridesSupport.responsiveDesignAvailable() && WebInspector.overridesSupport.emulationEnabled())
WebInspector.inspectorView.showViewInDrawer("emulation", true);
},
@@ -40,7 +40,7 @@ WebInspector.AdvancedApp.prototype = {
if (!this._toggleEmulationButton)
return;
var message = WebInspector.overridesSupport.warningMessage();
- this._toggleEmulationButton.title = message || WebInspector.UIString("Toggle device mode.");
+ this._toggleEmulationButton.setTitle(message || WebInspector.UIString("Toggle device mode."));
this._toggleEmulationButton.element.classList.toggle("warning", !!message);
},
« no previous file with comments | « Source/devtools/front_end/elements/AnimationsSidebarPane.js ('k') | Source/devtools/front_end/network/NetworkPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698