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

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

Issue 405803004: [DevTools] Move device mode button to AdvancedApp and add shortcut. (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
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/App.js
diff --git a/Source/devtools/front_end/main/App.js b/Source/devtools/front_end/main/App.js
index ed9a8987cc0965318d886aa3acbc023b3214d970..e99b8361db550cf011912cc8fa1271bcc90867e8 100644
--- a/Source/devtools/front_end/main/App.js
+++ b/Source/devtools/front_end/main/App.js
@@ -8,38 +8,10 @@
*/
WebInspector.App = function()
{
- 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.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);
- }
WebInspector.console.setUIDelegate(this);
};
WebInspector.App.prototype = {
- _toggleEmulationEnabled: function()
- {
- WebInspector.overridesSupport.setEmulationEnabled(!this._toggleEmulationButton.toggled);
- },
-
- _emulationEnabledChanged: function()
- {
- this._toggleEmulationButton.toggled = WebInspector.overridesSupport.emulationEnabled();
- if (!WebInspector.overridesSupport.responsiveDesignAvailable() && WebInspector.overridesSupport.emulationEnabled())
- WebInspector.inspectorView.showViewInDrawer("emulation", true);
- },
-
- _overridesWarningUpdated: function()
- {
- if (!this._toggleEmulationButton)
- return;
- var message = WebInspector.overridesSupport.warningMessage();
- this._toggleEmulationButton.title = message || WebInspector.UIString("Toggle device mode.");
- this._toggleEmulationButton.element.classList.toggle("warning", !!message);
- },
-
createRootView: function()
{
},
@@ -54,7 +26,6 @@ WebInspector.App.prototype = {
WebInspector.overridesSupport.applyInitialOverrides();
if (!WebInspector.overridesSupport.responsiveDesignAvailable() && WebInspector.overridesSupport.emulationEnabled())
WebInspector.inspectorView.showViewInDrawer("emulation", true);
- this._overridesWarningUpdated();
},
showConsole: function()
@@ -64,26 +35,6 @@ WebInspector.App.prototype = {
};
/**
- * @constructor
- * @implements {WebInspector.StatusBarButton.Provider}
- */
-WebInspector.App.EmulationButtonProvider = function()
-{
-}
-
-WebInspector.App.EmulationButtonProvider.prototype = {
- /**
- * @return {?WebInspector.StatusBarButton}
- */
- button: function()
- {
- if (!(WebInspector.app instanceof WebInspector.App))
- return null;
- return WebInspector.app._toggleEmulationButton || null;
- }
-}
-
-/**
* @type {!WebInspector.App}
*/
WebInspector.app;
« no previous file with comments | « Source/devtools/front_end/main/AdvancedApp.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698