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

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

Issue 347583003: DevTools: add emulation toggle button and splash screen. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing 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/inspector.css ('k') | Source/devtools/front_end/overrides.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fbbb440d61d19e28454234d68d1f9be796540b79..ac0314d4137b1c1a5697442ead516b3127f2bf6f 100644
--- a/Source/devtools/front_end/main/AdvancedApp.js
+++ b/Source/devtools/front_end/main/AdvancedApp.js
@@ -11,10 +11,7 @@ WebInspector.AdvancedApp = function()
WebInspector.App.call(this);
WebInspector.dockController.addEventListener(WebInspector.DockController.Events.BeforeDockSideChanged, this._openToolboxWindow, this);
- if (!WebInspector.experimentsSettings.responsiveDesign.isEnabled())
- return;
-
- this._toggleEmulationButton = new WebInspector.StatusBarButton(WebInspector.UIString("Responsive design and mobile emulation."), "responsive-design-status-bar-item");
+ this._toggleEmulationButton = new WebInspector.StatusBarButton(WebInspector.UIString("Toggle emulation enabled."), "responsive-design-status-bar-item");
this._toggleEmulationButton.toggled = WebInspector.overridesSupport.settings.emulationEnabled.get();
this._toggleEmulationButton.addEventListener("click", this._toggleEmulationEnabled, this);
WebInspector.overridesSupport.settings.emulationEnabled.addChangeListener(this._emulationEnabledChanged, this);
@@ -29,6 +26,8 @@ WebInspector.AdvancedApp.prototype = {
_emulationEnabledChanged: function()
{
this._toggleEmulationButton.toggled = WebInspector.overridesSupport.settings.emulationEnabled.get();
+ if (!WebInspector.experimentsSettings.responsiveDesign.isEnabled() && WebInspector.overridesSupport.settings.emulationEnabled.get())
+ WebInspector.inspectorView.showViewInDrawer("emulation", true);
},
createRootView: function()
« no previous file with comments | « Source/devtools/front_end/inspector.css ('k') | Source/devtools/front_end/overrides.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698