Bug 912121 - Rewrite require / import to match source tree. rs=devtools

In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location.  Here we rewrite all require and import calls to match the new
location that these files are installed to.
This commit is contained in:
J. Ryan Stinnett 2015-09-21 12:04:18 -05:00
parent f3f78c80e1
commit 9494d02df8
786 changed files with 2673 additions and 2406 deletions

View File

@ -11,7 +11,7 @@ module.metadata = {
const { Cu } = require("chrome");
const { Class } = require("../sdk/core/heritage");
const { MessagePort, MessageChannel } = require("../sdk/messaging");
const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { DebuggerServer } = devtoolsRequire("devtools/server/main");
const outputs = new WeakMap();

View File

@ -15,7 +15,7 @@ const { contract, validate } = require("../sdk/util/contract");
const { each, pairs, values } = require("../sdk/util/sequence");
const { onEnable, onDisable } = require("../dev/theme/hooks");
const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
const { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
// This is temporary workaround to allow loading of the developer tools client - volcan
// into a toolbox panel, this hack won't be necessary as soon as devtools patch will be

View File

@ -5,8 +5,8 @@
"use strict";
const { Cu } = require("chrome");
const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { getActiveTab } = require("../sdk/tabs/utils");
const { getMostRecentBrowserWindow } = require("../sdk/window/utils");

View File

@ -24,7 +24,7 @@ const Startup = Cu.import("resource://gre/modules/sdk/system/Startup.js", {}).ex
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function () {
return Cu.import("resource:///modules/devtools/ToolboxProcess.jsm", {}).
return Cu.import("resource:///modules/devtools/client/framework/ToolboxProcess.jsm", {}).
BrowserToolboxProcess;
});

View File

@ -12,7 +12,7 @@ const { Cc, Ci, Cu, Cr } = require("chrome");
const self = require("../self");
const prefs = require("../preferences/service");
const { merge } = require("../util/object");
const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const DEFAULT_LOG_LEVEL = "error";
const ADDON_LOG_LEVEL_PREF = "extensions." + self.id + ".sdk.console.logLevel";

View File

@ -15,7 +15,7 @@ const self = require('sdk/self');
const { getTabId, getTabForContentWindow } = require('../tabs/utils');
const { getInnerId } = require('../window/utils');
const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { require: devtoolsRequire } = devtools;
const { addContentGlobal, removeContentGlobal } = devtoolsRequire("devtools/server/content-globals");

View File

@ -798,7 +798,7 @@ function Loader(options) {
globals: {
get console() {
// Import Console.jsm from here to prevent loading it until someone uses it
let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm");
let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
let console = new ConsoleAPI({
consoleID: options.id ? "addon/" + options.id : ""
});

View File

@ -12,9 +12,9 @@ const { getMostRecentBrowserWindow } = require('sdk/window/utils');
const { data } = require('sdk/self');
const { set } = require('sdk/preferences/service');
const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { DebuggerServer } = devtoolsRequire("devtools/server/main");
const { DebuggerClient } = devtoolsRequire("devtools/toolkit/client/main");
const { DebuggerClient } = devtoolsRequire("devtools/shared/client/main");
var gClient;
var ok;

View File

@ -12,9 +12,9 @@ const { getMostRecentBrowserWindow } = require('sdk/window/utils');
const { data } = require('sdk/self');
const { set } = require('sdk/preferences/service');
const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { DebuggerServer } = devtoolsRequire("devtools/server/main");
const { DebuggerClient } = devtoolsRequire("devtools/toolkit/client/main");
const { DebuggerClient } = devtoolsRequire("devtools/shared/client/main");
var gClient;
var ok;

View File

@ -10,7 +10,7 @@ const { testPageMod, handleReadyState, openNewTab,
const { cleanUI, after } = require("sdk/test/utils");
const { open, getFrames, getMostRecentBrowserWindow, getInnerId } = require("sdk/window/utils");
const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { devtools } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { require: devtoolsRequire } = devtools;
const contentGlobals = devtoolsRequire("devtools/server/content-globals");

View File

@ -5,7 +5,7 @@
const { utils: Cu } = Components;
const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
const LoaderModule = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}).Loader;
const { console } = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
const { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
var {
Loader, main, Module, Require, unload
} = LoaderModule;

View File

@ -8,9 +8,9 @@ var isMulet = "ResponsiveUI" in browserWindow;
// Enable touch event shim on desktop that translates mouse events
// into touch ones
function enableTouch() {
let require = Cu.import('resource://gre/modules/devtools/Loader.jsm', {})
let require = Cu.import('resource://gre/modules/devtools/shared/Loader.jsm', {})
.devtools.require;
let { TouchEventSimulator } = require('devtools/toolkit/touch/simulator');
let { TouchEventSimulator } = require('devtools/shared/touch/simulator');
let touchEventSimulator = new TouchEventSimulator(shell.contentBrowser);
touchEventSimulator.start();
}
@ -108,7 +108,7 @@ function checkDebuggerPort() {
function initResponsiveDesign() {
Cu.import('resource:///modules/devtools/responsivedesign.jsm');
Cu.import('resource:///modules/devtools/client/responsivedesign/responsivedesign.jsm');
ResponsiveUIManager.on('on', function(event, {tab:tab}) {
let responsive = ResponsiveUIManager.getResponsiveUIForTab(tab);
let document = tab.ownerDocument;
@ -154,8 +154,8 @@ function openDevtools() {
Services.prefs.setIntPref('devtools.toolbox.sidebar.width',
browserWindow.outerWidth - 550);
Services.prefs.setCharPref('devtools.toolbox.host', 'side');
let {gDevTools} = Cu.import('resource:///modules/devtools/gDevTools.jsm', {});
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
let {gDevTools} = Cu.import('resource:///modules/devtools/client/framework/gDevTools.jsm', {});
let {devtools} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
let target = devtools.TargetFactory.forTab(browserWindow.gBrowser.selectedTab);
gDevTools.showToolbox(target);
}

View File

@ -8,7 +8,7 @@
XPCOMUtils.defineLazyGetter(this, "devtools", function() {
const { devtools } =
Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
return devtools;
});
@ -26,7 +26,7 @@ XPCOMUtils.defineLazyGetter(this, "B2GTabList", function() {
// Load the discovery module eagerly, so that it can set a device name at
// startup. This does not cause discovery to start listening for packets, as
// that only happens once DevTools is enabled.
devtools.require("devtools/toolkit/discovery/discovery");
devtools.require("devtools/shared/discovery/discovery");
var RemoteDebugger = {
_listening: false,
@ -103,7 +103,7 @@ var RemoteDebugger = {
}
this._listen();
const QR = devtools.require("devtools/toolkit/qrcode/index");
const QR = devtools.require("devtools/shared/qrcode/index");
this._receivingOOB = new Promise((resolve, reject) => {
this._handleAuthEvent = detail => {
debug(detail.action);

View File

@ -10,16 +10,16 @@ const DEVELOPER_HUD_LOG_PREFIX = 'DeveloperHUD';
const CUSTOM_HISTOGRAM_PREFIX = 'DEVTOOLS_HUD_CUSTOM_';
XPCOMUtils.defineLazyGetter(this, 'devtools', function() {
const {devtools} = Cu.import('resource://gre/modules/devtools/Loader.jsm', {});
const {devtools} = Cu.import('resource://gre/modules/devtools/shared/Loader.jsm', {});
return devtools;
});
XPCOMUtils.defineLazyGetter(this, 'DebuggerClient', function() {
return devtools.require('devtools/toolkit/client/main').DebuggerClient;
return devtools.require('devtools/shared/client/main').DebuggerClient;
});
XPCOMUtils.defineLazyGetter(this, 'WebConsoleUtils', function() {
return devtools.require('devtools/toolkit/webconsole/utils').Utils;
return devtools.require('devtools/shared/webconsole/utils').Utils;
});
XPCOMUtils.defineLazyGetter(this, 'EventLoopLagFront', function() {

View File

@ -7,7 +7,7 @@
"use strict";
const { Cu } = require("chrome");
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils.js");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const promise = require("promise");
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
const { BrowserTabList } = require("devtools/server/actors/webbrowser");

View File

@ -31,7 +31,7 @@ function startup(data, reason) {
Cu.import('resource://gre/modules/commonjs/toolkit/loader.js').Loader;
let { Loader, Require, Main } = loaderModule;
const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm");
const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
let loader = Loader({
paths: {

View File

@ -8,7 +8,7 @@ const { Cc, Ci, Cu } = require("chrome");
const { AddonManager } = Cu.import("resource://gre/modules/AddonManager.jsm", {});
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
const { Simulator } = Cu.import("resource://gre/modules/devtools/Simulator.jsm");
const { Simulator } = Cu.import("resource://gre/modules/devtools/shared/apps/Simulator.jsm");
const { SimulatorProcess } = require("./simulator-process");
const Runtime = require("sdk/system/runtime");
const URL = require("sdk/url");

View File

@ -13,7 +13,7 @@ const Environment = require("sdk/system/environment").env;
const Runtime = require("sdk/system/runtime");
const Subprocess = require("sdk/system/child_process/subprocess");
const { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
const { EventEmitter } = Cu.import("resource://gre/modules/devtools/event-emitter.js", {});
const { EventEmitter } = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {});
// Log subprocess error and debug messages to the console. This logs messages

View File

@ -181,13 +181,13 @@ XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () {
XPCOMUtils.defineLazyGetter(this, "DeveloperToolbar", function() {
let tmp = {};
Cu.import("resource:///modules/devtools/DeveloperToolbar.jsm", tmp);
Cu.import("resource:///modules/devtools/client/shared/DeveloperToolbar.jsm", tmp);
return new tmp.DeveloperToolbar(window, document.getElementById("developer-toolbar"));
});
XPCOMUtils.defineLazyGetter(this, "BrowserToolboxProcess", function() {
let tmp = {};
Cu.import("resource:///modules/devtools/ToolboxProcess.jsm", tmp);
Cu.import("resource:///modules/devtools/client/framework/ToolboxProcess.jsm", tmp);
return tmp.BrowserToolboxProcess;
});
@ -7689,15 +7689,15 @@ var TabContextMenu = {
};
XPCOMUtils.defineLazyModuleGetter(this, "gDevTools",
"resource:///modules/devtools/gDevTools.jsm");
"resource:///modules/devtools/client/framework/gDevTools.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "gDevToolsBrowser",
"resource:///modules/devtools/gDevTools.jsm");
"resource:///modules/devtools/client/framework/gDevTools.jsm");
Object.defineProperty(this, "HUDService", {
get: function HUDService_getter() {
let devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
return devtools.require("devtools/webconsole/hudservice");
let devtools = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}).devtools;
return devtools.require("devtools/client/webconsole/hudservice");
},
configurable: true,
enumerable: true
@ -7768,7 +7768,7 @@ var Scratchpad = {
XPCOMUtils.defineLazyGetter(Scratchpad, "ScratchpadManager", function() {
let tmp = {};
Cu.import("resource:///modules/devtools/scratchpad-manager.jsm", tmp);
Cu.import("resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm", tmp);
return tmp.ScratchpadManager;
});
@ -7780,7 +7780,7 @@ var ResponsiveUI = {
XPCOMUtils.defineLazyGetter(ResponsiveUI, "ResponsiveUIManager", function() {
let tmp = {};
Cu.import("resource:///modules/devtools/responsivedesign.jsm", tmp);
Cu.import("resource:///modules/devtools/client/responsivedesign/responsivedesign.jsm", tmp);
return tmp.ResponsiveUIManager;
});
@ -7792,8 +7792,8 @@ function openEyedropper() {
Object.defineProperty(this, "Eyedropper", {
get: function() {
let devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
return devtools.require("devtools/eyedropper/eyedropper").Eyedropper;
let devtools = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {}).devtools;
return devtools.require("devtools/client/eyedropper/eyedropper").Eyedropper;
},
configurable: true,
enumerable: true

View File

@ -555,7 +555,7 @@ nsContextMenu.prototype = {
},
inspectNode: function CM_inspectNode() {
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
let {devtools} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
let gBrowser = this.browser.ownerDocument.defaultView.gBrowser;
let tt = devtools.TargetFactory.forTab(gBrowser.selectedTab);
return gDevTools.showToolbox(tt, "inspector").then(function(toolbox) {

View File

@ -5,7 +5,7 @@
#endif
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
var gDebug = false;
try {

View File

@ -64,7 +64,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyGetter(this, "DownloadsLogger", () => {
let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
let { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
let consoleOptions = {
maxLogLevelPref: "browser.download.loglevel",
prefix: "Downloads"

View File

@ -1,7 +1,7 @@
XPCOMUtils.defineLazyModuleGetter(this, "CustomizableUI",
"resource:///modules/CustomizableUI.jsm");
Cu.import("resource://gre/modules/devtools/event-emitter.js");
Cu.import("resource://gre/modules/devtools/shared/event-emitter.js");
Cu.import("resource://gre/modules/ExtensionUtils.jsm");
var {

View File

@ -7,7 +7,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoopStorage",
"resource:///modules/loop/LoopStorage.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise",
@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "CardDavImporter",
XPCOMUtils.defineLazyModuleGetter(this, "GoogleImporter",
"resource:///modules/loop/GoogleImporter.jsm");
XPCOMUtils.defineLazyGetter(this, "eventEmitter", function() {
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js", {});
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {});
return new EventEmitter();
});

View File

@ -19,7 +19,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "WebChannel",
"resource://gre/modules/WebChannel.jsm");
XPCOMUtils.defineLazyGetter(this, "eventEmitter", function() {
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js", {});
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {});
return new EventEmitter();
});
XPCOMUtils.defineLazyGetter(this, "gLoopBundle", function() {

View File

@ -19,7 +19,7 @@ try {
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "eventEmitter", function() {
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js", {});
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js", {});
return new EventEmitter();
});

View File

@ -164,7 +164,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gWM",
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
XPCOMUtils.defineLazyGetter(this, "log", () => {
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/Console.jsm", {}).ConsoleAPI;
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI;
let consoleOptions = {
maxLogLevelPref: PREF_LOG_LEVEL,
prefix: "Loop"

View File

@ -38,7 +38,7 @@ Cu.import("resource://gre/modules/AsyncShutdown.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "RunState",
"resource:///modules/sessionstore/RunState.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",

View File

@ -18,7 +18,7 @@ Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", this);
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
"resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter",
"resource:///modules/sessionstore/PrivacyFilter.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SessionStore",

View File

@ -14,7 +14,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
// Returns the principal for a given |frame| contained in a given |docShell|.
function getPrincipalForFrame(docShell, frame) {

View File

@ -128,7 +128,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager",
XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
"@mozilla.org/base/telemetry;1", "nsITelemetry");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
"resource:///modules/RecentWindow.jsm");
@ -141,7 +141,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter",
XPCOMUtils.defineLazyModuleGetter(this, "RunState",
"resource:///modules/sessionstore/RunState.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ScratchpadManager",
"resource:///modules/devtools/scratchpad-manager.jsm");
"resource:///modules/devtools/client/scratchpad/scratchpad-manager.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SessionSaver",
"resource:///modules/sessionstore/SessionSaver.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SessionCookies",

View File

@ -13,7 +13,7 @@ Cu.import("resource://gre/modules/Promise.jsm", this);
Cu.import("resource://gre/modules/Task.jsm", this);
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivacyFilter",
"resource:///modules/sessionstore/PrivacyFilter.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TabStateCache",

View File

@ -42,7 +42,7 @@ Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
Cu.import("resource://gre/modules/Promise.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/devtools/Console.jsm");
"resource://gre/modules/devtools/shared/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "SessionFile",
"resource:///modules/sessionstore/SessionFile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "CrashMonitor",

View File

@ -73,7 +73,7 @@ const TARGET_SEARCHENGINE_PREFIX = "searchEngine-";
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
XPCOMUtils.defineLazyGetter(this, "log", () => {
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/Console.jsm", {}).ConsoleAPI;
let ConsoleAPI = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {}).ConsoleAPI;
let consoleOptions = {
maxLogLevelPref: PREF_LOG_LEVEL,
prefix: "UITour",

View File

@ -11,13 +11,13 @@
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Task.jsm");
var { loader, require } = Cu.import("resource://gre/modules/devtools/Loader.jsm");
Cu.import("resource://gre/modules/devtools/Console.jsm");
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
var { loader, require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm");
Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
loader.lazyRequireGetter(this, "promise");
loader.lazyRequireGetter(this, "EventEmitter",
"devtools/toolkit/event-emitter");
"devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "AnimationsFront",
"devtools/server/actors/animation", true);

View File

@ -8,7 +8,7 @@
"use strict";
const {AnimationsTimeline} = require("devtools/animationinspector/components");
const {AnimationsTimeline} = require("devtools/client/animationinspector/components");
/**
* The main animations panel UI.

View File

@ -21,13 +21,13 @@
// c.destroy();
const {Cu} = require("chrome");
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
const {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
const {
createNode,
drawGraphElementBackground,
findOptimalTimeInterval
} = require("devtools/animationinspector/utils");
} = require("devtools/client/animationinspector/utils");
const STRINGS_URI = "chrome://browser/locale/devtools/animationinspector.properties";
const L10N = new ViewHelpers.L10N(STRINGS_URI);

View File

@ -7,7 +7,7 @@
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
EXTRA_JS_MODULES.devtools.animationinspector += [
DevToolsModules(
'components.js',
'utils.js',
]
)

View File

@ -6,8 +6,8 @@
// Check that the timeline shows correct time graduations in the header.
const {findOptimalTimeInterval} = require("devtools/animationinspector/utils");
const {TimeScale} = require("devtools/animationinspector/components");
const {findOptimalTimeInterval} = require("devtools/client/animationinspector/utils");
const {TimeScale} = require("devtools/client/animationinspector/components");
// Should be kept in sync with TIME_GRADUATION_MIN_SPACING in components.js
const TIME_GRADUATION_MIN_SPACING = 40;

View File

@ -5,13 +5,13 @@
"use strict";
const Cu = Components.utils;
const {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const promise = require("promise");
const {TargetFactory} = require("devtools/framework/target");
const {console} = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
const {ViewHelpers} = Cu.import("resource:///modules/devtools/ViewHelpers.jsm", {});
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
const {TargetFactory} = require("devtools/client/framework/target");
const {console} = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
const {ViewHelpers} = Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm", {});
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
// All tests are asynchronous
waitForExplicitFinish();

View File

@ -7,8 +7,8 @@
"use strict";
const Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {findOptimalTimeInterval} = require("devtools/animationinspector/utils");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {findOptimalTimeInterval} = require("devtools/client/animationinspector/utils");
// This test array contains objects that are used to test the
// findOptimalTimeInterval function. Each object should have the following

View File

@ -6,8 +6,8 @@
"use strict";
const Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {TimeScale} = require("devtools/animationinspector/components");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {TimeScale} = require("devtools/client/animationinspector/components");
const TEST_ANIMATIONS = [{
desc: "Testing a few standard animations",

View File

@ -1,8 +1,8 @@
const {Cc,Ci,Cu,Cr} = require("chrome");
const ObservableObject = require("devtools/shared/observable-object");
const promise = require("devtools/toolkit/deprecated-sync-thenables");
const ObservableObject = require("devtools/client/shared/observable-object");
const promise = require("devtools/shared/deprecated-sync-thenables");
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js");
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js");
const {generateUUID} = Cc['@mozilla.org/uuid-generator;1'].getService(Ci.nsIUUIDGenerator);
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm");
const { indexedDB } = require("sdk/indexed-db");

View File

@ -4,7 +4,7 @@
"use strict";
var {Ci,Cu,CC} = require("chrome");
const promise = require("devtools/toolkit/deprecated-sync-thenables");
const promise = require("devtools/shared/deprecated-sync-thenables");
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm");
const {Services} = Cu.import("resource://gre/modules/Services.jsm");

View File

@ -3,8 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cu} = require("chrome");
const ObservableObject = require("devtools/shared/observable-object");
const {Devices} = Cu.import("resource://gre/modules/devtools/Devices.jsm");
const ObservableObject = require("devtools/client/shared/observable-object");
const {Devices} = Cu.import("resource://gre/modules/devtools/shared/apps/Devices.jsm");
var store = new ObservableObject({versions:[]});

View File

@ -2,8 +2,8 @@
* 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/. */
const ObservableObject = require("devtools/shared/observable-object");
const {Connection} = require("devtools/client/connection-manager");
const ObservableObject = require("devtools/client/shared/observable-object");
const {Connection} = require("devtools/shared/client/connection-manager");
const _knownConnectionStores = new WeakMap();

View File

@ -5,18 +5,18 @@
const Cu = Components.utils;
const Ci = Components.interfaces;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/devtools/gDevTools.jsm");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {Simulator} = Cu.import("resource://gre/modules/devtools/Simulator.jsm")
const {Devices} = Cu.import("resource://gre/modules/devtools/Devices.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {Simulator} = Cu.import("resource://gre/modules/devtools/shared/apps/Simulator.jsm")
const {Devices} = Cu.import("resource://gre/modules/devtools/shared/apps/Devices.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {ConnectionManager, Connection} = require("devtools/client/connection-manager");
const {ConnectionManager, Connection} = require("devtools/shared/client/connection-manager");
const {getDeviceFront} = require("devtools/server/actors/device");
const ConnectionStore = require("devtools/app-manager/connection-store");
const DeviceStore = require("devtools/app-manager/device-store");
const simulatorsStore = require("devtools/app-manager/simulators-store");
const adbStore = require("devtools/app-manager/builtin-adb-store");
const ConnectionStore = require("devtools/client/app-manager/connection-store");
const DeviceStore = require("devtools/client/app-manager/device-store");
const simulatorsStore = require("devtools/client/app-manager/simulators-store");
const adbStore = require("devtools/client/app-manager/builtin-adb-store");
window.addEventListener("unload", function onUnload() {
window.removeEventListener("unload", onUnload);

View File

@ -4,19 +4,19 @@
const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
const {gDevTools} = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
const {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {TargetFactory} = require("devtools/framework/target");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {TargetFactory} = require("devtools/client/framework/target");
const {ConnectionManager, Connection}
= require("devtools/client/connection-manager");
= require("devtools/shared/client/connection-manager");
const {getDeviceFront} = require("devtools/server/actors/device");
const {getTargetForApp, launchApp, closeApp}
= require("devtools/app-actor-front");
const DeviceStore = require("devtools/app-manager/device-store");
const WebappsStore = require("devtools/app-manager/webapps-store");
const promise = require("devtools/toolkit/deprecated-sync-thenables");
= require("devtools/shared/apps/app-actor-front");
const DeviceStore = require("devtools/client/app-manager/device-store");
const WebappsStore = require("devtools/client/app-manager/webapps-store");
const promise = require("devtools/shared/deprecated-sync-thenables");
const DEFAULT_APP_ICON = "chrome://browser/skin/devtools/app-manager/default-app-icon.png";
window.addEventListener("message", function(event) {

View File

@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {utils: Cu, interfaces: Ci} = Components;
Cu.import("resource:///modules/devtools/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {Toolbox} = require("devtools/framework/toolbox");
const {ConnectionManager, Connection} = require("devtools/client/connection-manager");
const promise = require("devtools/toolkit/deprecated-sync-thenables");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {Toolbox} = require("devtools/client/framework/toolbox");
const {ConnectionManager, Connection} = require("devtools/shared/client/connection-manager");
const promise = require("devtools/shared/deprecated-sync-thenables");
const prefs = require("sdk/preferences/service");
const Services = require("Services");
const Strings = Services.strings.createBundle("chrome://browser/locale/devtools/app-manager.properties");

View File

@ -5,7 +5,7 @@
Cu.import("resource://gre/modules/osfile.jsm");
const {VariablesView} =
Cu.import("resource:///modules/devtools/VariablesView.jsm", {});
Cu.import("resource:///modules/devtools/client/shared/widgets/VariablesView.jsm", {});
const VARIABLES_VIEW_URL =
"chrome://devtools/content/shared/widgets/VariablesView.xul";

View File

@ -6,18 +6,18 @@ const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
Cu.import("resource:///modules/devtools/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {ConnectionManager, Connection} = require("devtools/client/connection-manager");
const {AppProjects} = require("devtools/app-manager/app-projects");
const {AppValidator} = require("devtools/app-manager/app-validator");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {ConnectionManager, Connection} = require("devtools/shared/client/connection-manager");
const {AppProjects} = require("devtools/client/app-manager/app-projects");
const {AppValidator} = require("devtools/client/app-manager/app-validator");
const {Services} = Cu.import("resource://gre/modules/Services.jsm");
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm");
const {installHosted, installPackaged, getTargetForApp,
reloadApp, launchApp, closeApp} = require("devtools/app-actor-front");
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js");
reloadApp, launchApp, closeApp} = require("devtools/shared/apps/app-actor-front");
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js");
const promise = require("devtools/toolkit/deprecated-sync-thenables");
const promise = require("devtools/shared/deprecated-sync-thenables");
const MANIFEST_EDITOR_ENABLED = "devtools.appmanager.manifestEditor.enabled";

View File

@ -14,8 +14,8 @@
var Utils = (function() {
const Cu = Components.utils;
const {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const EventEmitter = require("devtools/toolkit/event-emitter");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const EventEmitter = require("devtools/shared/event-emitter");
function _createSetEventForwarder(key, finalStore) {

View File

@ -2,9 +2,9 @@
* 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/. */
const ObservableObject = require("devtools/shared/observable-object");
const ObservableObject = require("devtools/client/shared/observable-object");
const {getDeviceFront} = require("devtools/server/actors/device");
const {Connection} = require("devtools/client/connection-manager");
const {Connection} = require("devtools/shared/client/connection-manager");
const {Cu} = require("chrome");

View File

@ -7,7 +7,7 @@
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
EXTRA_JS_MODULES.devtools["app-manager"] += [
DevToolsModules(
'app-projects.js',
'app-validator.js',
'builtin-adb-store.js',
@ -15,4 +15,4 @@ EXTRA_JS_MODULES.devtools["app-manager"] += [
'device-store.js',
'simulators-store.js',
'webapps-store.js',
]
)

View File

@ -3,8 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cu} = require("chrome");
const ObservableObject = require("devtools/shared/observable-object");
const {Simulator} = Cu.import("resource://gre/modules/devtools/Simulator.jsm");
const ObservableObject = require("devtools/client/shared/observable-object");
const {Simulator} = Cu.import("resource://gre/modules/devtools/shared/apps/Simulator.jsm");
var store = new ObservableObject({versions:[]});

View File

@ -5,12 +5,12 @@
const {utils: Cu, classes: Cc, interfaces: Ci} = Components;
const {Promise: promise} =
Cu.import("resource://gre/modules/devtools/deprecated-sync-thenables.js", {});
Cu.import("resource://gre/modules/devtools/shared/deprecated-sync-thenables.js", {});
const {require} =
Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {AppProjects} = require("devtools/app-manager/app-projects");
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
const {AppProjects} = require("devtools/client/app-manager/app-projects");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const APP_MANAGER_URL = "about:app-manager";
const TEST_BASE =

View File

@ -18,9 +18,9 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
Cu.import("resource://testing-common/httpd.js");
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {AppValidator} = require("devtools/app-manager/app-validator");
const {AppValidator} = require("devtools/client/app-manager/app-validator");
const {Services} = Cu.import("resource://gre/modules/Services.jsm");
const nsFile = Components.Constructor("@mozilla.org/file/local;1",
"nsILocalFile", "initWithPath");

View File

@ -25,7 +25,7 @@ Bug 901519 - [app manager] data store for connections
<script type="application/javascript;version=1.8" src="chrome://devtools/content/app-manager/content/template.js"></script>
<script type="application/javascript;version=1.8">
const Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm");
const {DebuggerServer} = require("devtools/server/main");
if (!DebuggerServer.initialized) {
@ -37,10 +37,10 @@ Bug 901519 - [app manager] data store for connections
SimpleTest.waitForExplicitFinish();
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/devtools/gDevTools.jsm");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {ConnectionManager} = require("devtools/client/connection-manager");
const ConnectionStore = require("devtools/app-manager/connection-store");
const {ConnectionManager} = require("devtools/shared/client/connection-manager");
const ConnectionStore = require("devtools/client/app-manager/connection-store");
let connection = ConnectionManager.createConnection();
let store = new ConnectionStore(connection);

View File

@ -19,7 +19,7 @@ Bug 901520 - [app manager] data store for device
<script type="application/javascript;version=1.8" src="chrome://devtools/content/app-manager/content/template.js"></script>
<script type="application/javascript;version=1.8">
const Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm");
const {DebuggerServer} = require("devtools/server/main");
if (!DebuggerServer.initialized) {
@ -35,10 +35,10 @@ Bug 901520 - [app manager] data store for device
SimpleTest.waitForExplicitFinish();
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/devtools/gDevTools.jsm");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {ConnectionManager} = require("devtools/client/connection-manager");
const DeviceStore = require("devtools/app-manager/device-store");
const {ConnectionManager} = require("devtools/shared/client/connection-manager");
const DeviceStore = require("devtools/client/app-manager/device-store");
let {getDeviceFront} = require("devtools/server/actors/device");

View File

@ -22,9 +22,9 @@ Bug 907206 - data store for local apps
window.onload = function() {
SimpleTest.waitForExplicitFinish();
const { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const { AppProjects } = require("devtools/app-manager/app-projects");
const { AppProjects } = require("devtools/client/app-manager/app-projects");
function testHosted(projects) {
let manifestURL = document.location.href.replace("test_projects_store.html", "hosted_app/webapp.manifest");

View File

@ -18,7 +18,7 @@ Bug 912646 - Closing app toolbox causes phone to disconnect
<script type="application/javascript;version=1.8">
const Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm");
const {DebuggerServer} = require("devtools/server/main");
if (!DebuggerServer.initialized) {
@ -29,15 +29,15 @@ Bug 912646 - Closing app toolbox causes phone to disconnect
window.onload = function() {
SimpleTest.waitForExplicitFinish();
Cu.import("resource:///modules/devtools/gDevTools.jsm");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {TargetFactory} = require("devtools/framework/target");
const {Toolbox} = require("devtools/framework/toolbox");
const {TargetFactory} = require("devtools/client/framework/target");
const {Toolbox} = require("devtools/client/framework/toolbox");
const {Connection, ConnectionManager} =
require("devtools/client/connection-manager");
require("devtools/shared/client/connection-manager");
const ConnectionStore =
require("devtools/app-manager/connection-store");
require("devtools/client/app-manager/connection-store");
let connection = ConnectionManager.createConnection();

View File

@ -158,9 +158,9 @@
SimpleTest.waitForExplicitFinish();
const Cu = Components.utils;
Cu.import("resource:///modules/devtools/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const ObservableObject = require("devtools/shared/observable-object");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const ObservableObject = require("devtools/client/shared/observable-object");
let data = {
title: "ttt",

View File

@ -2,9 +2,9 @@
* 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/. */
const ObservableObject = require("devtools/shared/observable-object");
const promise = require("devtools/toolkit/deprecated-sync-thenables");
const {Connection} = require("devtools/client/connection-manager");
const ObservableObject = require("devtools/client/shared/observable-object");
const promise = require("devtools/shared/deprecated-sync-thenables");
const {Connection} = require("devtools/shared/client/connection-manager");
const {Cu} = require("chrome");
const _knownWebappsStores = new WeakMap();

View File

@ -7,18 +7,18 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource:///modules/devtools/SideMenuWidget.jsm");
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
Cu.import("resource://gre/modules/devtools/Console.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/SideMenuWidget.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
Cu.import("resource://gre/modules/devtools/shared/Console.jsm");
const { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
const { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const promise = require("promise");
const EventEmitter = require("devtools/toolkit/event-emitter");
const EventEmitter = require("devtools/shared/event-emitter");
const { CallWatcherFront } = require("devtools/server/actors/call-watcher");
const { CanvasFront } = require("devtools/server/actors/canvas");
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const Telemetry = require("devtools/shared/telemetry");
const Telemetry = require("devtools/client/shared/telemetry");
const telemetry = new Telemetry();
const CANVAS_ACTOR_RECORDING_ATTEMPT = DevToolsUtils.testing ? 500 : 5000;
@ -36,7 +36,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyGetter(this, "NetworkHelper", function() {
return require("devtools/toolkit/webconsole/network-helper");
return require("devtools/shared/webconsole/network-helper");
});
// The panel's window global is an EventEmitter firing the following events:

View File

@ -3,8 +3,8 @@
# 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/.
EXTRA_JS_MODULES.devtools.canvasdebugger += [
DevToolsModules(
'panel.js'
]
)
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']

View File

@ -7,9 +7,9 @@
const { Cc, Ci, Cu, Cr } = require("chrome");
const promise = require("promise");
const EventEmitter = require("devtools/toolkit/event-emitter");
const EventEmitter = require("devtools/shared/event-emitter");
const { CanvasFront } = require("devtools/server/actors/canvas");
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
function CanvasDebuggerPanel(iframeWindow, toolbox) {
this.panelWin = iframeWindow;

View File

@ -13,19 +13,19 @@ Services.prefs.setBoolPref("devtools.debugger.log", false);
var { generateUUID } = Cc['@mozilla.org/uuid-generator;1'].getService(Ci.nsIUUIDGenerator);
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
var { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
var { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var promise = require("promise");
var { DebuggerClient } = require("devtools/toolkit/client/main");
var { DebuggerClient } = require("devtools/shared/client/main");
var { DebuggerServer } = require("devtools/server/main");
var { CallWatcherFront } = require("devtools/server/actors/call-watcher");
var { CanvasFront } = require("devtools/server/actors/canvas");
var { setTimeout } = require("sdk/timers");
var DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
var TiltGL = require("devtools/tilt/tilt-gl");
var { TargetFactory } = require("devtools/framework/target");
var { Toolbox } = require("devtools/framework/toolbox");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
var TiltGL = require("devtools/client/tilt/tilt-gl");
var { TargetFactory } = require("devtools/client/framework/target");
var { Toolbox } = require("devtools/client/framework/toolbox");
var mm = null
const FRAME_SCRIPT_UTILS_URL = "chrome://devtools/content/shared/frame-script-utils.js";

View File

@ -36,7 +36,7 @@ function test() {
function getHighlighterNumber() {
// Note that this only works as long as gcli tests aren't run with e10s on.
// To make this e10s ready, execute this in a content frame script instead.
return require("devtools/toolkit/gcli/commands/highlight").highlighters.length;
return require("devtools/shared/gcli/commands/highlight").highlighters.length;
}
function* runCommand(cmd, options) {

View File

@ -23,7 +23,7 @@ function* spawnTest() {
const { createSystem } = require("gcli/system");
const system = createSystem({ location: "server" });
const gcliInit = require("devtools/toolkit/gcli/commands/index");
const gcliInit = require("devtools/shared/gcli/commands/index");
gcliInit.addAllItemsByModule(system);
yield system.load();

View File

@ -5,9 +5,9 @@
const TEST_BASE_HTTP = "http://example.com/browser/browser/devtools/commandline/test/";
const TEST_BASE_HTTPS = "https://example.com/browser/browser/devtools/commandline/test/";
var { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
var { console } = require("resource://gre/modules/devtools/Console.jsm");
var DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { console } = require("resource://gre/modules/devtools/shared/Console.jsm");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
// Import the GCLI test helper
var testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));

View File

@ -22,8 +22,8 @@ var { helpers, assert } = (function() {
var helpers = {};
var { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
var { TargetFactory } = require("devtools/framework/target");
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var { TargetFactory } = require("devtools/client/framework/target");
var assert = { ok: ok, is: is, log: info };
var util = require('gcli/util/util');

View File

@ -5,7 +5,7 @@
const constants = require("../constants");
const { rdpInvoke, asPaused } = require("../utils");
const { reportException } = require("devtools/toolkit/DevToolsUtils");
const { reportException } = require("devtools/shared/DevToolsUtils");
const FETCH_EVENT_LISTENERS_DELAY = 200; // ms

View File

@ -0,0 +1,8 @@
# vim: set filetype=python:
# 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/.
DevToolsModules(
'event-listeners.js',
)

View File

@ -0,0 +1,16 @@
# vim: set filetype=python:
# 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/.
DIRS += [
'actions',
'reducers',
'views',
]
DevToolsModules(
'constants.js',
'globalActions.js',
'utils.js'
)

View File

@ -0,0 +1,9 @@
# vim: set filetype=python:
# 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/.
DevToolsModules(
'event-listeners.js',
'index.js'
)

View File

@ -3,8 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { promiseInvoke } = require("devtools/async-utils");
const { reportException } = require("devtools/toolkit/DevToolsUtils");
const { promiseInvoke } = require("devtools/shared/async-utils");
const { reportException } = require("devtools/shared/DevToolsUtils");
function rdpInvoke(client, method, ...args) {
return promiseInvoke(client, method, ...args)

View File

@ -4,7 +4,7 @@
"use strict";
const actions = require('../actions/event-listeners');
const { bindActionCreators } = require('devtools/shared/vendor/redux');
const { bindActionCreators } = require('devtools/client/shared/vendor/redux');
/**
* Functions handling the event listeners UI.

View File

@ -0,0 +1,8 @@
# vim: set filetype=python:
# 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/.
DevToolsModules(
'event-listeners-view.js'
)

View File

@ -7,7 +7,7 @@
const { Cc, Ci, Cu } = require("chrome");
const l10n = require("gcli/l10n");
loader.lazyImporter(this, "gDevTools", "resource:///modules/devtools/gDevTools.jsm");
loader.lazyImporter(this, "gDevTools", "resource:///modules/devtools/client/framework/gDevTools.jsm");
/**
* The commands and converters that are exported to GCLI

View File

@ -94,31 +94,31 @@ const FRAME_TYPE = {
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/devtools/event-emitter.js");
Cu.import("resource:///modules/devtools/SimpleListWidget.jsm");
Cu.import("resource:///modules/devtools/BreadcrumbsWidget.jsm");
Cu.import("resource:///modules/devtools/SideMenuWidget.jsm");
Cu.import("resource:///modules/devtools/VariablesView.jsm");
Cu.import("resource:///modules/devtools/VariablesViewController.jsm");
Cu.import("resource:///modules/devtools/ViewHelpers.jsm");
Cu.import("resource://gre/modules/devtools/shared/event-emitter.js");
Cu.import("resource:///modules/devtools/client/shared/widgets/SimpleListWidget.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/BreadcrumbsWidget.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/SideMenuWidget.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/VariablesView.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/VariablesViewController.jsm");
Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm");
Cu.import("resource:///modules/devtools/shared/browser-loader.js");
const require = BrowserLoader("resource:///modules/devtools/debugger/", this).require;
Cu.import("resource:///modules/devtools/client/shared/browser-loader.js");
const require = BrowserLoader("resource:///modules/devtools/client/debugger/", this).require;
const {TargetFactory} = require("devtools/framework/target");
const {Toolbox} = require("devtools/framework/toolbox");
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
const promise = require("devtools/toolkit/deprecated-sync-thenables");
const Editor = require("devtools/sourceeditor/editor");
const DebuggerEditor = require("devtools/sourceeditor/debugger.js");
const {Tooltip} = require("devtools/shared/widgets/Tooltip");
const FastListWidget = require("devtools/shared/widgets/FastListWidget");
const {TargetFactory} = require("devtools/client/framework/target");
const {Toolbox} = require("devtools/client/framework/toolbox");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const promise = require("devtools/shared/deprecated-sync-thenables");
const Editor = require("devtools/client/sourceeditor/editor");
const DebuggerEditor = require("devtools/client/sourceeditor/debugger");
const {Tooltip} = require("devtools/client/shared/widgets/Tooltip");
const FastListWidget = require("devtools/client/shared/widgets/FastListWidget");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Parser",
"resource:///modules/devtools/Parser.jsm");
"resource:///modules/devtools/client/shared/Parser.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ShortcutUtils",
"resource://gre/modules/ShortcutUtils.jsm");
@ -128,7 +128,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "clipboardHelper",
Object.defineProperty(this, "NetworkHelper", {
get: function() {
return require("devtools/toolkit/webconsole/network-helper");
return require("devtools/shared/webconsole/network-helper");
},
configurable: true,
enumerable: true

View File

@ -36,11 +36,11 @@ const PROMISE_DEBUGGER_URL =
"chrome://devtools/content/promisedebugger/promise-debugger.xhtml";
const debuggerControllerEmit = DebuggerController.emit.bind(DebuggerController);
const createStore = require("devtools/shared/redux/create-store")();
const { combineEmittingReducers } = require("devtools/shared/redux/reducers");
const createStore = require("devtools/client/shared/redux/create-store")();
const { combineEmittingReducers } = require("devtools/client/shared/redux/reducers");
const reducers = require("./content/reducers/index");
const store = createStore(combineEmittingReducers(reducers, debuggerControllerEmit));
const { NAME: WAIT_UNTIL_NAME } = require("devtools/shared/redux/middleware/wait-service");
const { NAME: WAIT_UNTIL_NAME } = require("devtools/client/shared/redux/middleware/wait-service");
const services = {
WAIT_UNTIL: WAIT_UNTIL_NAME

View File

@ -3,28 +3,13 @@
# 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/.
EXTRA_JS_MODULES.devtools.debugger += [
DIRS += [
'content',
]
DevToolsModules(
'debugger-commands.js',
'panel.js'
]
EXTRA_JS_MODULES.devtools.debugger.content += [
'content/constants.js',
'content/globalActions.js',
'content/utils.js'
]
EXTRA_JS_MODULES.devtools.debugger.content.views += [
'content/views/event-listeners-view.js'
]
EXTRA_JS_MODULES.devtools.debugger.content.reducers += [
'content/reducers/event-listeners.js',
'content/reducers/index.js'
]
EXTRA_JS_MODULES.devtools.debugger.content.actions += [
'content/actions/event-listeners.js',
]
)
BROWSER_CHROME_MANIFESTS += ['test/mochitest/browser.ini']

View File

@ -7,8 +7,8 @@
const { Cc, Ci, Cu, Cr } = require("chrome");
const promise = require("promise");
const EventEmitter = require("devtools/toolkit/event-emitter");
const DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
const EventEmitter = require("devtools/shared/event-emitter");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
function DebuggerPanel(iframeWindow, toolbox) {
this.panelWin = iframeWindow;

View File

@ -12,7 +12,7 @@ var gAttached = promise.defer();
var gNewGlobal = promise.defer()
var gNewChromeSource = promise.defer()
var { DevToolsLoader } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
var { DevToolsLoader } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var loader = new DevToolsLoader();
loader.invisibleToDebugger = true;
loader.main("devtools/server/main");

View File

@ -6,7 +6,7 @@
*/
function test() {
let { Parser } = Cu.import("resource:///modules/devtools/Parser.jsm", {});
let { Parser } = Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
let source = "let x = 42;";
let parser = new Parser();

View File

@ -6,7 +6,7 @@
*/
function test() {
let { Parser } = Cu.import("resource:///modules/devtools/Parser.jsm", {});
let { Parser } = Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
let source = "let x + 42;";
let parser = new Parser();

View File

@ -6,7 +6,7 @@
*/
function test() {
let { Parser } = Cu.import("resource:///modules/devtools/Parser.jsm", {});
let { Parser } = Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
let source = [
"<!doctype html>",

View File

@ -6,7 +6,7 @@
*/
function test() {
let { Parser } = Cu.import("resource:///modules/devtools/Parser.jsm", {});
let { Parser } = Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
let source = [
"<!doctype html>",

View File

@ -7,7 +7,7 @@
*/
function test() {
let { Parser } = Cu.import("resource:///modules/devtools/Parser.jsm", {});
let { Parser } = Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
let source = [
"let a = [];",

View File

@ -8,7 +8,7 @@
function test() {
let { Parser, ParserHelpers, SyntaxTreeVisitor } =
Cu.import("resource:///modules/devtools/Parser.jsm", {});
Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
function verify(source, predicate, [sline, scol], [eline, ecol]) {
let ast = Parser.reflectionAPI.parse(source);

View File

@ -7,7 +7,7 @@
*/
function test() {
let { ParserHelpers } = Cu.import("resource:///modules/devtools/Parser.jsm", {});
let { ParserHelpers } = Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
let node1 = { loc: {
start: { line: 1, column: 10 },

View File

@ -7,7 +7,7 @@
function test() {
let { Parser, ParserHelpers, SyntaxTreeVisitor } =
Cu.import("resource:///modules/devtools/Parser.jsm", {});
Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
function verify(source, predicate, details) {
let { name, chain } = details;

View File

@ -8,7 +8,7 @@
function test() {
let { Parser, ParserHelpers, SyntaxTreeVisitor } =
Cu.import("resource:///modules/devtools/Parser.jsm", {});
Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
function verify(source, predicate, details) {
let { name, chain } = details;

View File

@ -7,7 +7,7 @@
function test() {
let { Parser, ParserHelpers, SyntaxTreeVisitor } =
Cu.import("resource:///modules/devtools/Parser.jsm", {});
Cu.import("resource:///modules/devtools/client/shared/Parser.jsm", {});
function verify(source, predicate, string) {
let ast = Parser.reflectionAPI.parse(source);

View File

@ -4,7 +4,7 @@ function a(){b()}function b(){debugger}
// Generate this file by evaluating the following in a browser-environment
// scratchpad:
//
// let { require } = Components.utils.import('resource://gre/modules/devtools/Loader.jsm', {});
// let { require } = Components.utils.import('resource://gre/modules/devtools/shared/Loader.jsm', {});
// let { SourceNode } = require("source-map");
//
// let dataUrl = s => "data:text/javascript," + s;

View File

@ -13,18 +13,18 @@ var gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
Services.prefs.setBoolPref("devtools.debugger.log", false);
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
var { Promise: promise } = Cu.import("resource://gre/modules/devtools/deprecated-sync-thenables.js", {});
var { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
var DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
var { BrowserToolboxProcess } = Cu.import("resource:///modules/devtools/ToolboxProcess.jsm", {});
var { Promise: promise } = Cu.import("resource://gre/modules/devtools/shared/deprecated-sync-thenables.js", {});
var { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
var { BrowserToolboxProcess } = Cu.import("resource:///modules/devtools/client/framework/ToolboxProcess.jsm", {});
var { DebuggerServer } = require("devtools/server/main");
var { DebuggerClient, ObjectClient } = require("devtools/toolkit/client/main");
var { DebuggerClient, ObjectClient } = require("devtools/shared/client/main");
var { AddonManager } = Cu.import("resource://gre/modules/AddonManager.jsm", {});
var EventEmitter = require("devtools/toolkit/event-emitter");
const { promiseInvoke } = require("devtools/async-utils");
var { TargetFactory } = require("devtools/framework/target");
var { Toolbox } = require("devtools/framework/toolbox")
var EventEmitter = require("devtools/shared/event-emitter");
const { promiseInvoke } = require("devtools/shared/async-utils");
var { TargetFactory } = require("devtools/client/framework/target");
var { Toolbox } = require("devtools/client/framework/toolbox")
const EXAMPLE_URL = "http://example.com/browser/browser/devtools/debugger/test/mochitest/";
const FRAME_SCRIPT_URL = getRootDirectory(gTestPath) + "code_frame-script.js";

View File

@ -11,19 +11,19 @@ const { Services } = require("resource://gre/modules/Services.jsm");
loader.lazyGetter(this, "osString", () => Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).OS);
// Panels
loader.lazyGetter(this, "OptionsPanel", () => require("devtools/framework/toolbox-options").OptionsPanel);
loader.lazyGetter(this, "InspectorPanel", () => require("devtools/inspector/inspector-panel").InspectorPanel);
loader.lazyGetter(this, "WebConsolePanel", () => require("devtools/webconsole/panel").WebConsolePanel);
loader.lazyGetter(this, "DebuggerPanel", () => require("devtools/debugger/panel").DebuggerPanel);
loader.lazyGetter(this, "StyleEditorPanel", () => require("devtools/styleeditor/styleeditor-panel").StyleEditorPanel);
loader.lazyGetter(this, "ShaderEditorPanel", () => require("devtools/shadereditor/panel").ShaderEditorPanel);
loader.lazyGetter(this, "CanvasDebuggerPanel", () => require("devtools/canvasdebugger/panel").CanvasDebuggerPanel);
loader.lazyGetter(this, "WebAudioEditorPanel", () => require("devtools/webaudioeditor/panel").WebAudioEditorPanel);
loader.lazyGetter(this, "MemoryPanel", () => require("devtools/memory/panel").MemoryPanel);
loader.lazyGetter(this, "PerformancePanel", () => require("devtools/performance/panel").PerformancePanel);
loader.lazyGetter(this, "NetMonitorPanel", () => require("devtools/netmonitor/panel").NetMonitorPanel);
loader.lazyGetter(this, "StoragePanel", () => require("devtools/storage/panel").StoragePanel);
loader.lazyGetter(this, "ScratchpadPanel", () => require("devtools/scratchpad/scratchpad-panel").ScratchpadPanel);
loader.lazyGetter(this, "OptionsPanel", () => require("devtools/client/framework/toolbox-options").OptionsPanel);
loader.lazyGetter(this, "InspectorPanel", () => require("devtools/client/inspector/inspector-panel").InspectorPanel);
loader.lazyGetter(this, "WebConsolePanel", () => require("devtools/client/webconsole/panel").WebConsolePanel);
loader.lazyGetter(this, "DebuggerPanel", () => require("devtools/client/debugger/panel").DebuggerPanel);
loader.lazyGetter(this, "StyleEditorPanel", () => require("devtools/client/styleeditor/styleeditor-panel").StyleEditorPanel);
loader.lazyGetter(this, "ShaderEditorPanel", () => require("devtools/client/shadereditor/panel").ShaderEditorPanel);
loader.lazyGetter(this, "CanvasDebuggerPanel", () => require("devtools/client/canvasdebugger/panel").CanvasDebuggerPanel);
loader.lazyGetter(this, "WebAudioEditorPanel", () => require("devtools/client/webaudioeditor/panel").WebAudioEditorPanel);
loader.lazyGetter(this, "MemoryPanel", () => require("devtools/client/memory/panel").MemoryPanel);
loader.lazyGetter(this, "PerformancePanel", () => require("devtools/client/performance/panel").PerformancePanel);
loader.lazyGetter(this, "NetMonitorPanel", () => require("devtools/client/netmonitor/panel").NetMonitorPanel);
loader.lazyGetter(this, "StoragePanel", () => require("devtools/client/storage/panel").StoragePanel);
loader.lazyGetter(this, "ScratchpadPanel", () => require("devtools/client/scratchpad/scratchpad-panel").ScratchpadPanel);
// Strings
const toolboxProps = "chrome://browser/locale/devtools/toolbox.properties";
@ -95,9 +95,9 @@ Tools.inspector = {
},
inMenu: true,
commands: [
"devtools/responsivedesign/resize-commands",
"devtools/inspector/inspector-commands",
"devtools/eyedropper/commands.js"
"devtools/client/responsivedesign/resize-commands",
"devtools/client/inspector/inspector-commands",
"devtools/client/eyedropper/commands.js"
],
preventClosingOnKey: true,
@ -131,7 +131,7 @@ Tools.webConsole = {
( osString == "Darwin" ? "Cmd+Opt+" : "Ctrl+Shift+" ) + this.key);
},
inMenu: true,
commands: "devtools/webconsole/console-commands",
commands: "devtools/client/webconsole/console-commands",
preventClosingOnKey: true,
onkey: function(panel, toolbox) {
@ -167,7 +167,7 @@ Tools.jsdebugger = {
( osString == "Darwin" ? "Cmd+Opt+" : "Ctrl+Shift+" ) + this.key);
},
inMenu: true,
commands: "devtools/debugger/debugger-commands",
commands: "devtools/client/debugger/debugger-commands",
isTargetSupported: function(target) {
return true;
@ -194,7 +194,7 @@ Tools.styleEditor = {
"Shift+" + functionkey(this.key));
},
inMenu: true,
commands: "devtools/styleeditor/styleeditor-commands",
commands: "devtools/client/styleeditor/styleeditor-commands",
isTargetSupported: function(target) {
return target.hasActor("styleEditor") || target.hasActor("styleSheets");
@ -388,7 +388,7 @@ Tools.scratchpad = {
panelLabel: l10n("scratchpad.panelLabel", scratchpadStrings),
tooltip: l10n("scratchpad.tooltip", scratchpadStrings),
inMenu: false,
commands: "devtools/scratchpad/scratchpad-commands",
commands: "devtools/client/scratchpad/scratchpad-commands",
isTargetSupported: function(target) {
return target.isRemote;

View File

@ -39,11 +39,11 @@ devtoolsCommandlineHandler.prototype = {
handleConsoleFlag: function(cmdLine) {
let window = Services.wm.getMostRecentWindow("devtools:webconsole");
if (!window) {
let { require } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
let { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
// Load the browser devtools main module as the loader's main module.
Cu.import("resource:///modules/devtools/gDevTools.jsm");
let hudservice = require("devtools/webconsole/hudservice");
let { console } = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
let hudservice = require("devtools/client/webconsole/hudservice");
let { console } = Cu.import("resource://gre/modules/devtools/shared/Console.jsm", {});
hudservice.toggleBrowserConsole().then(null, console.error);
} else {
window.focus(); // the Browser Console was already open
@ -77,7 +77,7 @@ devtoolsCommandlineHandler.prototype = {
if (!this._isRemoteDebuggingEnabled()) {
return;
}
Cu.import("resource:///modules/devtools/ToolboxProcess.jsm");
Cu.import("resource:///modules/devtools/client/framework/ToolboxProcess.jsm");
BrowserToolboxProcess.init();
if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
@ -94,7 +94,7 @@ devtoolsCommandlineHandler.prototype = {
portOrPath = 6000;
}
let { DevToolsLoader } =
Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
try {
// Create a separate loader instance, so that we can be sure to receive

View File

@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const l10n = require("gcli/l10n");
const EventEmitter = require("devtools/toolkit/event-emitter");
const EventEmitter = require("devtools/shared/event-emitter");
const eventEmitter = new EventEmitter();
var { Eyedropper, EyedropperManager } = require("devtools/eyedropper/eyedropper");
var { Eyedropper, EyedropperManager } = require("devtools/client/eyedropper/eyedropper");
/**
* 'eyedropper' command

View File

@ -3,9 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const {Cc, Ci, Cu} = require("chrome");
const {rgbToHsl} = require("devtools/css-color").colorUtils;
const Telemetry = require("devtools/shared/telemetry");
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js");
const {rgbToHsl} = require("devtools/shared/css-color").colorUtils;
const Telemetry = require("devtools/client/shared/telemetry");
const {EventEmitter} = Cu.import("resource://gre/modules/devtools/shared/event-emitter.js");
const promise = require("promise");
const {setTimeout, clearTimeout} = Cu.import("resource://gre/modules/Timer.jsm", {});
@ -133,7 +133,7 @@ function Eyedropper(chromeWindow, opts = { copyOnSelect: true, context: "other"
};
let mm = this._contentTab.linkedBrowser.messageManager;
mm.loadFrameScript("resource:///modules/devtools/eyedropper/eyedropper-child.js", true);
mm.loadFrameScript("resource:///modules/devtools/client/eyedropper/eyedropper-child.js", true);
// record if this was opened via the picker or standalone
var telemetry = new Telemetry();

Some files were not shown because too many files have changed in this diff Show More