Backed out changeset f85e650c1df7 (bug 847971)
authorJosh Matthews <josh@joshmatthews.net>
Sun, 17 Mar 2013 12:33:37 -0400
changeset 125150 6c9fcfd9f4cedc9d3f722f79e72e0d10882f11fb
parent 125149 f85e650c1df785fbc77785ac363fe92a5aaeeaea
child 125151 218356c595fcd3b969bc5f83ddc1c6c0ee43fd6e
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs847971
milestone22.0a1
backs outf85e650c1df785fbc77785ac363fe92a5aaeeaea
Backed out changeset f85e650c1df7 (bug 847971)
browser/base/content/browser.js
browser/components/downloads/content/allDownloadsViewOverlay.js
browser/components/downloads/src/DownloadsUI.js
browser/components/nsBrowserContentHandler.js
browser/components/nsBrowserGlue.js
browser/modules/Makefile.in
browser/modules/RecentWindow.jsm
toolkit/content/contentAreaUtils.js
toolkit/modules/Makefile.in
toolkit/modules/RecentWindow.jsm
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -2,17 +2,17 @@
 # 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/.
 
 let Ci = Components.interfaces;
 let Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/RecentWindow.jsm");
+Cu.import("resource:///modules/RecentWindow.jsm");
 
 const nsIWebNavigation = Ci.nsIWebNavigation;
 
 var gCharsetMenu = null;
 var gLastBrowserCharset = null;
 var gPrevCharset = null;
 var gProxyFavIcon = null;
 var gLastValidURLStr = "";
--- a/browser/components/downloads/content/allDownloadsViewOverlay.js
+++ b/browser/components/downloads/content/allDownloadsViewOverlay.js
@@ -18,17 +18,17 @@ Cu.import("resource://gre/modules/NetUti
 Cu.import("resource://gre/modules/DownloadUtils.jsm");
 Cu.import("resource:///modules/DownloadsCommon.jsm");
 Cu.import("resource://gre/modules/PlacesUtils.jsm");
 Cu.import("resource://gre/modules/osfile.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
                                   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
-                                  "resource://gre/modules/RecentWindow.jsm");
+                                  "resource:///modules/RecentWindow.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
                                   "resource://gre/modules/FileUtils.jsm");
 
 const nsIDM = Ci.nsIDownloadManager;
 
 const DESTINATION_FILE_URI_ANNO  = "downloads/destinationFileURI";
 const DOWNLOAD_META_DATA_ANNO    = "downloads/metaData";
 
--- a/browser/components/downloads/src/DownloadsUI.js
+++ b/browser/components/downloads/src/DownloadsUI.js
@@ -26,17 +26,17 @@ Cu.import("resource://gre/modules/Servic
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",
                                   "resource:///modules/DownloadsCommon.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "gBrowserGlue",
                                    "@mozilla.org/browser/browserglue;1",
                                    "nsIBrowserGlue");
 XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
-                                  "resource://gre/modules/RecentWindow.jsm");
+                                  "resource:///modules/RecentWindow.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
                                   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// DownloadsUI
 
 function DownloadsUI()
 {
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
                                   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
-                                  "resource://gre/modules/RecentWindow.jsm");
+                                  "resource:///modules/RecentWindow.jsm");
 
 const nsISupports            = Components.interfaces.nsISupports;
 
 const nsIBrowserDOMWindow    = Components.interfaces.nsIBrowserDOMWindow;
 const nsIBrowserHandler      = Components.interfaces.nsIBrowserHandler;
 const nsIBrowserHistory      = Components.interfaces.nsIBrowserHistory;
 const nsIChannel             = Components.interfaces.nsIChannel;
 const nsICommandLine         = Components.interfaces.nsICommandLine;
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -52,17 +52,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
                                   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "KeywordURLResetPrompter",
                                   "resource:///modules/KeywordURLResetPrompter.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
-                                  "resource://gre/modules/RecentWindow.jsm");
+                                  "resource:///modules/RecentWindow.jsm");
 
 const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser";
 const PREF_PLUGINS_UPDATEURL  = "plugins.update.url";
 
 // We try to backup bookmarks at idle times, to avoid doing that at shutdown.
 // Number of idle seconds before trying to backup bookmarks.  15 minutes.
 const BOOKMARKS_BACKUP_IDLE_TIME = 15 * 60;
 // Minimum interval in milliseconds between backups.
--- a/browser/modules/Makefile.in
+++ b/browser/modules/Makefile.in
@@ -20,16 +20,21 @@ EXTRA_JS_MODULES = \
 	SignInToWebsite.jsm \
 	webappsUI.jsm \
 	webrtcUI.jsm \
 	KeywordURLResetPrompter.jsm \
 	Social.jsm \
 	SharedFrame.jsm \
 	$(NULL)
 
+EXTRA_PP_JS_MODULES = \
+	RecentWindow.jsm \
+	$(NULL)
+
+
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 EXTRA_JS_MODULES += \
 	WindowsPreviewPerTab.jsm \
 	$(NULL)
 EXTRA_PP_JS_MODULES += \
 	WindowsJumpLists.jsm \
 	$(NULL)
 endif
rename from toolkit/modules/RecentWindow.jsm
rename to browser/modules/RecentWindow.jsm
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -1,16 +1,15 @@
 # -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 
 # 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/.
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
-Components.utils.import("resource://gre/modules/RecentWindow.jsm");
 
 var ContentAreaUtils = {
 
   // this is for backwards compatibility.
   get ioService() {
     return Services.io;
   },
 
@@ -1068,19 +1067,17 @@ function openURL(aURL)
   var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
                               .getService(Components.interfaces.nsIExternalProtocolService);
 
   if (!protocolSvc.isExposedProtocol(uri.scheme)) {
     // If we're not a browser, use the external protocol service to load the URI.
     protocolSvc.loadUrl(uri);
   }
   else {
-    let isPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
-    var recentWindow = RecentWindow.getMostRecentWindow({type: "navigator:browser",
-                                                         private: isPrivate});
+    var recentWindow = Services.wm.getMostRecentWindow("navigator:browser");
     if (recentWindow) {
       var win = recentWindow.browserDOMWindow.openURI(uri, null,
                                                       recentWindow.browserDOMWindow.OPEN_DEFAULTWINDOW,
                                                       recentWindow.browserDOMWindow.OPEN_NEW);
       win.focus();
       return;
     }
 
--- a/toolkit/modules/Makefile.in
+++ b/toolkit/modules/Makefile.in
@@ -11,13 +11,9 @@ include $(DEPTH)/config/autoconf.mk
 
 EXTRA_JS_MODULES := \
   NewTabUtils.jsm \
   Sqlite.jsm \
   TelemetryTimestamps.jsm \
   Timer.jsm \
   $(NULL)
 
-EXTRA_PP_JS_MODULES = \
-  RecentWindow.jsm \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk