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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeButton.js

Issue 1647653003: [DevTools] Remove old responsive design v1 code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeButton.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeButton.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeButton.js
deleted file mode 100644
index 76efe84a8ebbfbe87dad91c51a5afdf51bd3b5b2..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeButton.js
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/**
- * @constructor
- * @implements {WebInspector.ToolbarItem.Provider}
- */
-WebInspector.DeviceModeButtonProvider = function()
-{
- var action = WebInspector.actionRegistry.action("emulation.toggle-device-mode");
- var button = WebInspector.Toolbar.createActionButton(action);
- WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.EmulationStateChanged, emulationEnabledChanged);
- WebInspector.overridesSupport.addEventListener(WebInspector.OverridesSupport.Events.OverridesWarningUpdated, updateWarning);
-
- emulationEnabledChanged();
- updateWarning();
-
- function emulationEnabledChanged()
- {
- action.setToggled(WebInspector.overridesSupport.emulationEnabled());
- }
-
- function updateWarning()
- {
- var message = WebInspector.overridesSupport.warningMessage();
- action.setTitle(message || WebInspector.UIString("Toggle device mode"));
- button.element.classList.toggle("warning", !!message);
- }
-
- this._button = button;
-}
-
-WebInspector.DeviceModeButtonProvider.prototype = {
- /**
- * @override
- * @return {?WebInspector.ToolbarItem}
- */
- item: function()
- {
- return this._button;
- }
-}
-
-/**
- * @constructor
- * @implements {WebInspector.ActionDelegate}
- */
-WebInspector.ToggleDeviceModeActionDelegate = function()
-{
-}
-
-WebInspector.ToggleDeviceModeActionDelegate.prototype = {
- /**
- * @override
- * @param {!WebInspector.Context} context
- * @param {string} actionId
- * @return {boolean}
- */
- handleAction: function(context, actionId)
- {
- WebInspector.overridesSupport.setEmulationEnabled(!WebInspector.overridesSupport.emulationEnabled());
- return true;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698