diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-03-02 10:32:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 10:32:45 +0100 |
commit | e272829137195b46612b7664c9416364089f7baa (patch) | |
tree | 20b543048260952a2c4ac8bb4cb22aaaa684bd84 /browser/components | |
parent | ba2c2e5301bb2d993984c62cdf2fd07b361e6bca (diff) | |
parent | c8355b22c047c9737e32f096b816edbb8b0fa181 (diff) | |
download | UXP-e272829137195b46612b7664c9416364089f7baa.tar UXP-e272829137195b46612b7664c9416364089f7baa.tar.gz UXP-e272829137195b46612b7664c9416364089f7baa.tar.lz UXP-e272829137195b46612b7664c9416364089f7baa.tar.xz UXP-e272829137195b46612b7664c9416364089f7baa.zip |
Merge pull request #34 from janekptacijarabaci/devtools_import-from-moebius_1
Port across devtools enhancements
Diffstat (limited to 'browser/components')
-rw-r--r-- | browser/components/nsBrowserContentHandler.js | 14 | ||||
-rw-r--r-- | browser/components/sessionstore/SessionStore.jsm | 25 | ||||
-rw-r--r-- | browser/components/shell/nsSetDefaultBrowser.js | 2 |
3 files changed, 33 insertions, 8 deletions
diff --git a/browser/components/nsBrowserContentHandler.js b/browser/components/nsBrowserContentHandler.js index e8fe0fe93..b366c3f81 100644 --- a/browser/components/nsBrowserContentHandler.js +++ b/browser/components/nsBrowserContentHandler.js @@ -454,16 +454,16 @@ nsBrowserContentHandler.prototype = { get helpInfo() { let info = - " --browser Open a browser window.\n" + - " --new-window <url> Open <url> in a new window.\n" + - " --new-tab <url> Open <url> in a new tab.\n" + - " --private-window <url> Open <url> in a new private window.\n"; + " --browser Open a browser window.\n" + + " --new-window <url> Open <url> in a new window.\n" + + " --new-tab <url> Open <url> in a new tab.\n" + + " --private-window <url> Open <url> in a new private window.\n"; if (AppConstants.platform == "win") { - info += " --preferences Open Options dialog.\n"; + info += " --preferences Open Options dialog.\n"; } else { - info += " --preferences Open Preferences dialog.\n"; + info += " --preferences Open Preferences dialog.\n"; } - info += " --search <term> Search <term> with your default search engine.\n"; + info += " --search <term> Search <term> with your default search engine.\n"; return info; }, diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index 2f44b2af3..93e21357f 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -186,6 +186,15 @@ XPCOMUtils.defineLazyModuleGetter(this, "ViewSourceBrowser", XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown", "resource://gre/modules/AsyncShutdown.jsm"); +Object.defineProperty(this, "HUDService", { + get: function HUDService_getter() { + let devtools = Cu.import("resource://devtools/shared/Loader.jsm", {}).devtools; + return devtools.require("devtools/client/webconsole/hudservice").HUDService; + }, + configurable: true, + enumerable: true +}); + /** * |true| if we are in debug mode, |false| otherwise. * Debug mode is controlled by preference browser.sessionstore.debug @@ -2570,10 +2579,16 @@ var SessionStoreInternal = { this._capClosedWindows(); } + // Scratchpad if (lastSessionState.scratchpads) { ScratchpadManager.restoreSession(lastSessionState.scratchpads); } + // The Browser Console + if (lastSessionState.browserConsole) { + HUDService.restoreBrowserConsoleSession(); + } + // Set data that persists between sessions this._recentCrashes = lastSessionState.session && lastSessionState.session.recentCrashes || 0; @@ -2931,6 +2946,7 @@ var SessionStoreInternal = { global: this._globalState.getState() }; + // Scratchpad if (Cu.isModuleLoaded("resource://devtools/client/scratchpad/scratchpad-manager.jsm")) { // get open Scratchpad window states too let scratchpads = ScratchpadManager.getSessionState(); @@ -2939,6 +2955,9 @@ var SessionStoreInternal = { } } + // The Browser Console + state.browserConsole = HUDService.getBrowserConsoleSessionState(); + // Persist the last session if we deferred restoring it if (LastSession.canRestore) { state.lastSessionState = LastSession.getState(); @@ -3290,9 +3309,15 @@ var SessionStoreInternal = { this.restoreWindow(aWindow, root.windows[0], aOptions); + // Scratchpad if (aState.scratchpads) { ScratchpadManager.restoreSession(aState.scratchpads); } + + // The Browser Console + if (aState.browserConsole) { + HUDService.restoreBrowserConsoleSession(); + } }, /** diff --git a/browser/components/shell/nsSetDefaultBrowser.js b/browser/components/shell/nsSetDefaultBrowser.js index bb09ab213..c7a78c538 100644 --- a/browser/components/shell/nsSetDefaultBrowser.js +++ b/browser/components/shell/nsSetDefaultBrowser.js @@ -21,7 +21,7 @@ nsSetDefaultBrowser.prototype = { } }, - helpInfo: " --setDefaultBrowser Set this app as the default browser.\n", + helpInfo: " --setDefaultBrowser Set this app as the default browser.\n", classID: Components.ID("{F57899D0-4E2C-4ac6-9E29-50C736103B0C}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]), |