зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1491741 - Part 1: Remove the XPCOM registration for nsAppStartupNotifier; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D5994
This commit is contained in:
Родитель
9b9060a876
Коммит
14b7695438
|
@ -55,7 +55,7 @@
|
|||
|
||||
#include "nsIAppShellService.h"
|
||||
#include "nsIAppStartup.h"
|
||||
#include "nsIAppStartupNotifier.h"
|
||||
#include "nsAppStartupNotifier.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIChromeRegistry.h"
|
||||
|
@ -4629,9 +4629,7 @@ XREMain::XRE_mainRun()
|
|||
mDirProvider.InitializeUserPrefs();
|
||||
|
||||
{
|
||||
nsCOMPtr<nsIObserver> startupNotifier
|
||||
(do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIObserver> startupNotifier = new nsAppStartupNotifier();
|
||||
|
||||
startupNotifier->Observe(nullptr, APPSTARTUP_TOPIC, nullptr);
|
||||
}
|
||||
|
|
|
@ -8,15 +8,9 @@
|
|||
|
||||
#include "nsIAppStartupNotifier.h"
|
||||
|
||||
// {1F59B001-02C9-11d5-AE76-CC92F7DB9E03}
|
||||
#define NS_APPSTARTUPNOTIFIER_CID \
|
||||
{ 0x1f59b001, 0x2c9, 0x11d5, { 0xae, 0x76, 0xcc, 0x92, 0xf7, 0xdb, 0x9e, 0x3 } }
|
||||
|
||||
class nsAppStartupNotifier : public nsIObserver
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_CID_ACCESSOR( NS_APPSTARTUPNOTIFIER_CID )
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "prenv.h"
|
||||
|
||||
#include "nsIAppShell.h"
|
||||
#include "nsIAppStartupNotifier.h"
|
||||
#include "nsAppStartupNotifier.h"
|
||||
#include "nsIDirectoryService.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIToolkitChromeRegistry.h"
|
||||
|
@ -202,10 +202,7 @@ XRE_InitEmbedding2(nsIFile *aLibXULDirectory,
|
|||
// If the app wants to autoregister every time (for instance, if it's debug),
|
||||
// it can do so after we return from this function.
|
||||
|
||||
nsCOMPtr<nsIObserver> startupNotifier
|
||||
(do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID));
|
||||
if (!startupNotifier)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsCOMPtr<nsIObserver> startupNotifier = new nsAppStartupNotifier();
|
||||
|
||||
startupNotifier->Observe(nullptr, APPSTARTUP_TOPIC, nullptr);
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsDialogParamBlock.h"
|
||||
#include "nsWindowWatcher.h"
|
||||
#include "nsAppStartupNotifier.h"
|
||||
#include "nsFind.h"
|
||||
#include "nsWebBrowserPersist.h"
|
||||
#include "nsNetCID.h"
|
||||
|
@ -19,7 +18,6 @@
|
|||
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserPersist)
|
||||
|
||||
|
@ -43,7 +41,6 @@ NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID);
|
|||
#endif
|
||||
NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FIND_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WEBBROWSERPERSIST_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
|
||||
|
@ -63,7 +60,6 @@ static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
|
|||
#endif
|
||||
{ &kNS_WINDOWWATCHER_CID, false, nullptr, nsWindowWatcherConstructor },
|
||||
{ &kNS_FIND_CID, false, nullptr, nsFindConstructor },
|
||||
{ &kNS_APPSTARTUPNOTIFIER_CID, false, nullptr, nsAppStartupNotifierConstructor },
|
||||
{ &kNS_WEBBROWSERPERSIST_CID, false, nullptr, nsWebBrowserPersistConstructor },
|
||||
{ nullptr }
|
||||
};
|
||||
|
@ -77,7 +73,6 @@ static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
|
|||
#endif
|
||||
{ NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID },
|
||||
{ NS_FIND_CONTRACTID, &kNS_FIND_CID },
|
||||
{ NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID },
|
||||
{ NS_WEBBROWSERPERSIST_CONTRACTID, &kNS_WEBBROWSERPERSIST_CID },
|
||||
{ nullptr }
|
||||
};
|
||||
|
|
|
@ -42,8 +42,6 @@
|
|||
and release them.
|
||||
*/
|
||||
|
||||
#define NS_APPSTARTUPNOTIFIER_CONTRACTID "@mozilla.org/embedcomp/appstartup-notifier;1"
|
||||
|
||||
#define APPSTARTUP_CATEGORY "app-startup"
|
||||
#define APPSTARTUP_TOPIC "app-startup"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче