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

Unified Diff: Source/devtools/front_end/elements/OverridesView.js

Issue 342163002: DevTools: move emulation button into the base App.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comments addressed. Created 6 years, 6 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
« no previous file with comments | « Source/devtools/front_end/ResponsiveDesignView.js ('k') | Source/devtools/front_end/inspector.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/elements/OverridesView.js
diff --git a/Source/devtools/front_end/elements/OverridesView.js b/Source/devtools/front_end/elements/OverridesView.js
index 434b4f7eb7f4c27821e31ee1f13cdc2246916a2e..11cc153899624428fca2e530b64cc68df9071f91 100644
--- a/Source/devtools/front_end/elements/OverridesView.js
+++ b/Source/devtools/front_end/elements/OverridesView.js
@@ -44,10 +44,8 @@ WebInspector.OverridesView = function()
this._tabbedPane.verticalTabLayout = true;
- if (!WebInspector.overridesSupport.isInspectingDevice()) {
- new WebInspector.OverridesView.DeviceTab().appendAsTab(this._tabbedPane);
- new WebInspector.OverridesView.MediaTab().appendAsTab(this._tabbedPane);
- }
+ new WebInspector.OverridesView.DeviceTab().appendAsTab(this._tabbedPane);
+ new WebInspector.OverridesView.MediaTab().appendAsTab(this._tabbedPane);
new WebInspector.OverridesView.NetworkTab().appendAsTab(this._tabbedPane);
new WebInspector.OverridesView.SensorsTab().appendAsTab(this._tabbedPane);
@@ -65,13 +63,13 @@ WebInspector.OverridesView = function()
this._splashScreenElement = this.element.createChild("div", "overrides-splash-screen");
this._splashScreenElement.createTextChild(WebInspector.UIString("Emulation is currently disabled. Toggle "));
- var toggleEmulationButton = new WebInspector.StatusBarButton("", "responsive-design-status-bar-item");
+ var toggleEmulationButton = new WebInspector.StatusBarButton("", "emulation-status-bar-item");
toggleEmulationButton.addEventListener("click", this._toggleEmulationEnabled, this);
this._splashScreenElement.appendChild(toggleEmulationButton.element);
this._splashScreenElement.createTextChild(WebInspector.UIString("in the main toolbar to enable it."));
WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.OverridesWarningUpdated, this._overridesWarningUpdated, this);
- WebInspector.overridesSupport.settings.emulationEnabled.addChangeListener(this._emulationEnabledChanged, this);
+ WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.EmulationStateChanged, this._emulationEnabledChanged, this);
this._emulationEnabledChanged();
}
@@ -87,20 +85,20 @@ WebInspector.OverridesView.prototype = {
_overridesWarningUpdated: function()
{
var message = WebInspector.overridesSupport.warningMessage();
- this._warningFooter.classList.toggle("hidden", !WebInspector.overridesSupport.settings.emulationEnabled.get() || !message);
+ this._warningFooter.classList.toggle("hidden", !WebInspector.overridesSupport.emulationEnabled() || !message);
this._warningFooter.textContent = message;
},
_toggleEmulationEnabled: function()
{
- WebInspector.overridesSupport.settings.emulationEnabled.set(true);
+ WebInspector.overridesSupport.setEmulationEnabled(true);
},
_emulationEnabledChanged: function()
{
- this._tabbedPane.element.classList.toggle("hidden", !WebInspector.overridesSupport.settings.emulationEnabled.get());
+ this._tabbedPane.element.classList.toggle("hidden", !WebInspector.overridesSupport.emulationEnabled());
this._overridesWarningUpdated();
- this._splashScreenElement.classList.toggle("hidden", WebInspector.overridesSupport.settings.emulationEnabled.get());
+ this._splashScreenElement.classList.toggle("hidden", WebInspector.overridesSupport.emulationEnabled());
},
__proto__: WebInspector.VBox.prototype
« no previous file with comments | « Source/devtools/front_end/ResponsiveDesignView.js ('k') | Source/devtools/front_end/inspector.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698