diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js index cfd9cfcb0d64..d7c69f8646ef 100644 --- a/devtools/client/definitions.js +++ b/devtools/client/definitions.js @@ -27,7 +27,7 @@ loader.lazyGetter(this, "DomPanel", () => require("devtools/client/dom/dom-panel // Other dependencies loader.lazyRequireGetter(this, "CommandUtils", "devtools/client/shared/developer-toolbar", true); loader.lazyRequireGetter(this, "CommandState", "devtools/shared/gcli/command-state", true); -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); loader.lazyImporter(this, "ScratchpadManager", "resource://devtools/client/scratchpad/scratchpad-manager.jsm"); const {MultiLocalizationHelper} = require("devtools/shared/l10n"); diff --git a/devtools/client/framework/devtools-browser.js b/devtools/client/framework/devtools-browser.js index 9f0e15869dc4..248f26298e0f 100644 --- a/devtools/client/framework/devtools-browser.js +++ b/devtools/client/framework/devtools-browser.js @@ -25,7 +25,7 @@ loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/main", loader.lazyRequireGetter(this, "BrowserMenus", "devtools/client/framework/browser-menus"); loader.lazyRequireGetter(this, "appendStyleSheet", "devtools/client/shared/stylesheet-utils", true); loader.lazyRequireGetter(this, "DeveloperToolbar", "devtools/client/shared/developer-toolbar", true); -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); loader.lazyImporter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm"); loader.lazyImporter(this, "ScratchpadManager", "resource://devtools/client/scratchpad/scratchpad-manager.jsm"); diff --git a/devtools/client/menus.js b/devtools/client/menus.js index 4f16aac602c5..15676d48b55e 100644 --- a/devtools/client/menus.js +++ b/devtools/client/menus.js @@ -31,7 +31,7 @@ loader.lazyRequireGetter(this, "gDevToolsBrowser", "devtools/client/framework/devtools-browser", true); loader.lazyRequireGetter(this, "CommandUtils", "devtools/client/shared/developer-toolbar", true); loader.lazyRequireGetter(this, "TargetFactory", "devtools/client/framework/target", true); -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); loader.lazyImporter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm"); loader.lazyImporter(this, "ScratchpadManager", "resource://devtools/client/scratchpad/scratchpad-manager.jsm"); diff --git a/devtools/client/preferences/devtools.js b/devtools/client/preferences/devtools.js index fce269b49c75..c077314432af 100644 --- a/devtools/client/preferences/devtools.js +++ b/devtools/client/preferences/devtools.js @@ -337,6 +337,3 @@ pref("devtools.editor.autocomplete", true); // opened developer tool. This allows us to ping telemetry just once per browser // version for each user. pref("devtools.telemetry.tools.opened.version", "{}"); - -// Enable the HTML responsive design mode for all channels. -pref("devtools.responsive.html.enabled", true); diff --git a/devtools/client/responsive.html/manager.js b/devtools/client/responsive.html/manager.js index f8fdf55684fd..79c67d020d68 100644 --- a/devtools/client/responsive.html/manager.js +++ b/devtools/client/responsive.html/manager.js @@ -31,10 +31,6 @@ loader.lazyRequireGetter(this, "EmulationFront", /** * ResponsiveUIManager is the external API for the browser UI, etc. to use when * opening and closing the responsive UI. - * - * While the HTML UI is in an experimental stage, the older ResponsiveUIManager - * from devtools/client/responsivedesign/responsivedesign.jsm delegates to this - * object when the pref "devtools.responsive.html.enabled" is true. */ const ResponsiveUIManager = exports.ResponsiveUIManager = { activeTabs: new Map(), diff --git a/devtools/client/responsive.html/test/browser/head.js b/devtools/client/responsive.html/test/browser/head.js index 13473d49f62a..bb6e2b22f67f 100644 --- a/devtools/client/responsive.html/test/browser/head.js +++ b/devtools/client/responsive.html/test/browser/head.js @@ -51,19 +51,16 @@ flags.testing = true; Services.prefs.clearUserPref("devtools.responsive.html.displayedDeviceList"); Services.prefs.setCharPref("devtools.devices.url", TEST_URI_ROOT + "devices.json"); -Services.prefs.setBoolPref("devtools.responsive.html.enabled", true); registerCleanupFunction(() => { flags.testing = false; Services.prefs.clearUserPref("devtools.devices.url"); - Services.prefs.clearUserPref("devtools.responsive.html.enabled"); Services.prefs.clearUserPref("devtools.responsive.html.displayedDeviceList"); asyncStorage.removeItem("devtools.devices.url_cache"); asyncStorage.removeItem("devtools.devices.local"); }); -// This depends on the "devtools.responsive.html.enabled" pref -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); /** * Open responsive design mode for the given tab. diff --git a/devtools/client/responsivedesign/moz.build b/devtools/client/responsivedesign/moz.build index 9585efed7670..4661b27e635f 100644 --- a/devtools/client/responsivedesign/moz.build +++ b/devtools/client/responsivedesign/moz.build @@ -7,7 +7,6 @@ BROWSER_CHROME_MANIFESTS += ['test/browser.ini'] DevToolsModules( 'resize-commands.js', 'responsivedesign-old.js', - 'responsivedesign.js', ) with Files('**'): diff --git a/devtools/client/responsivedesign/resize-commands.js b/devtools/client/responsivedesign/resize-commands.js index 577cbdb28684..afc1eb298488 100644 --- a/devtools/client/responsivedesign/resize-commands.js +++ b/devtools/client/responsivedesign/resize-commands.js @@ -6,7 +6,7 @@ const { Cc, Ci, Cu } = require("chrome"); -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); const BRAND_SHORT_NAME = Cc["@mozilla.org/intl/stringbundle;1"]. getService(Ci.nsIStringBundleService). diff --git a/devtools/client/responsivedesign/responsivedesign.js b/devtools/client/responsivedesign/responsivedesign.js deleted file mode 100644 index 080920626db4..000000000000 --- a/devtools/client/responsivedesign/responsivedesign.js +++ /dev/null @@ -1,22 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -const Services = require("Services"); - -const NEW_RDM_ENABLED = "devtools.responsive.html.enabled"; - -// If the new HTML RDM UI is enabled and e10s is enabled by default (e10s is required for -// the new HTML RDM UI to function), delegate the ResponsiveUIManager API over to that -// tool instead. Performing this delegation here allows us to contain the pref check to a -// single place. -if (Services.prefs.getBoolPref(NEW_RDM_ENABLED) && - Services.appinfo.browserTabsRemoteAutostart) { - let { ResponsiveUIManager } = require("devtools/client/responsive.html/manager"); - module.exports = ResponsiveUIManager; -} else { - let { ResponsiveUIManager } = require("devtools/client/responsivedesign/responsivedesign-old"); - module.exports = ResponsiveUIManager; -} diff --git a/devtools/client/responsivedesign/test/head.js b/devtools/client/responsivedesign/test/head.js index 17b19974d95d..f82216f76ba0 100644 --- a/devtools/client/responsivedesign/test/head.js +++ b/devtools/client/responsivedesign/test/head.js @@ -27,7 +27,7 @@ registerCleanupFunction(() => { SimpleTest.requestCompleteLog(); -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager"); /** * Open the Responsive Design Mode diff --git a/devtools/client/shared/test/browser_telemetry_button_responsive.js b/devtools/client/shared/test/browser_telemetry_button_responsive.js index aa2c22c35e6a..ad0417c264ae 100644 --- a/devtools/client/shared/test/browser_telemetry_button_responsive.js +++ b/devtools/client/shared/test/browser_telemetry_button_responsive.js @@ -10,7 +10,7 @@ const TEST_URI = "data:text/html;charset=utf-8," + // opened we make use of setTimeout() to create tool active times. const TOOL_DELAY = 200; -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); add_task(function* () { yield addTab(TEST_URI); diff --git a/devtools/client/styleeditor/StyleEditorUI.jsm b/devtools/client/styleeditor/StyleEditorUI.jsm index c000faa47f3d..e97e678a3be5 100644 --- a/devtools/client/styleeditor/StyleEditorUI.jsm +++ b/devtools/client/styleeditor/StyleEditorUI.jsm @@ -31,7 +31,7 @@ const csscoverage = require("devtools/shared/fronts/csscoverage"); const {console} = require("resource://gre/modules/Console.jsm"); const {KeyCodes} = require("devtools/client/shared/keycodes"); -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); const LOAD_ERROR = "error-load"; const STYLE_EDITOR_TEMPLATE = "stylesheet"; diff --git a/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js b/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js index 607f49436155..fc3bde792904 100644 --- a/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js +++ b/devtools/client/styleeditor/test/browser_styleeditor_media_sidebar_links.js @@ -16,7 +16,7 @@ registerCleanupFunction(() => { asyncStorage.removeItem("devtools.devices.url_cache"); }); -loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsivedesign/responsivedesign"); +loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true); const TESTCASE_URI = TEST_BASE_HTTPS + "media-rules.html"; const responsiveModeToggleClass = ".media-responsive-mode-toggle";