From 7c02f4bc98551b5b3c6adbca5c20de22ba759b3f Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Mon, 26 Apr 1999 19:03:08 +0000 Subject: [PATCH] oops, checked in the wrong file, backing this out (it's not ready yet) git-svn-id: svn://10.0.0.236/trunk@29213 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/base/src/nsMessenger.cpp | 69 +++++++++++++++++++---- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/mozilla/mailnews/base/src/nsMessenger.cpp b/mozilla/mailnews/base/src/nsMessenger.cpp index 2627afc2862..bd82b78020c 100644 --- a/mozilla/mailnews/base/src/nsMessenger.cpp +++ b/mozilla/mailnews/base/src/nsMessenger.cpp @@ -20,40 +20,82 @@ #include "nsMessengerNameSet.h" #include "nsIScriptNameSetRegistry.h" -#include "nsIAppShellComponent.h" - #include "nsDOMCID.h" static NS_DEFINE_IID(kCScriptNameSetRegistryCID, NS_SCRIPT_NAMESET_REGISTRY_CID); -class nsMessengerBootstrap : public nsIAppShellComponent { +class nsMessengerBootstrap : public nsIAppShellService { public: - nsMessengerBootstrap(); + nsMessengerBootstrap(nsIServiceManager *serviceManager); virtual ~nsMessengerBootstrap(); NS_DECL_ISUPPORTS // nsIAppShellService // Initialize() is the only one we care about - NS_IMETHOD Initialize(nsIAppShellService *appShell, - nsICmdLineService *args); + NS_IMETHOD Initialize(); + +private: + nsIServiceManager *mServiceManager; + + +private: + NS_IMETHOD Run(void) { return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHOD GetNativeEvent(void *& aEvent, + nsIWebShellWindow* aWidget, + PRBool &aIsInWindow, + PRBool &aIsMouseEvent) + { return NS_ERROR_NOT_IMPLEMENTED; } + + NS_IMETHOD DispatchNativeEvent(void * aEvent) + { return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHOD Shutdown(void) + { return NS_ERROR_NOT_IMPLEMENTED; } + + NS_IMETHOD CreateTopLevelWindow(nsIWebShellWindow * aParent, + nsIURL* aUrl, + nsString& aControllerIID, + nsIWebShellWindow*& aResult, nsIStreamObserver* anObserver, + nsIXULWindowCallbacks *aCallbacks, + PRInt32 aInitialWidth, PRInt32 aInitialHeight) + { return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHOD CreateDialogWindow( nsIWebShellWindow * aParent, + nsIURL* aUrl, + nsString& aControllerIID, + nsIWebShellWindow*& aResult, + nsIStreamObserver* anObserver, + nsIXULWindowCallbacks *aCallbacks, + PRInt32 aInitialWidth, PRInt32 aInitialHeight) + { return NS_ERROR_NOT_IMPLEMENTED; } + + NS_IMETHOD CloseTopLevelWindow(nsIWebShellWindow* aWindow) + { return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHOD RegisterTopLevelWindow(nsIWebShellWindow* aWindow) + { return NS_ERROR_NOT_IMPLEMENTED; } + NS_IMETHOD UnregisterTopLevelWindow(nsIWebShellWindow* aWindow) + { return NS_ERROR_NOT_IMPLEMENTED; } + }; -NS_IMPL_ISUPPORTS(nsMessengerBootstrap, nsIAppShellComponent::GetIID()) +NS_IMPL_ISUPPORTS(nsMessengerBootstrap, nsIAppShellService::GetIID()) -nsMessengerBootstrap::nsMessengerBootstrap() +nsMessengerBootstrap::nsMessengerBootstrap(nsIServiceManager *serviceManager) + : mServiceManager(serviceManager) { NS_INIT_REFCNT(); + + if (mServiceManager) NS_ADDREF(mServiceManager); } nsMessengerBootstrap::~nsMessengerBootstrap() { + NS_IF_RELEASE(mServiceManager); + } nsresult -nsMessengerBootstrap::Initialize(nsIAppShellService *appShell, - nsICmdLineService *args) +nsMessengerBootstrap::Initialize() { nsresult rv; @@ -76,15 +118,18 @@ nsMessengerBootstrap::Initialize(nsIAppShellService *appShell, nsresult -NS_NewMessengerBootstrap(const nsIID &aIID, void ** msgboot) +NS_NewMessengerBootstrap(const nsIID &aIID, void ** msgboot, + nsIServiceManager *serviceManager) { if (!msgboot) return NS_ERROR_NULL_POINTER; + if (!serviceManager) return NS_ERROR_NULL_POINTER; nsMessengerBootstrap *bootstrap = - new nsMessengerBootstrap(); + new nsMessengerBootstrap(serviceManager); if (!bootstrap) return NS_ERROR_OUT_OF_MEMORY; + return bootstrap->QueryInterface(aIID, msgboot); }