diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index c72eb042b2d..49be29aa12b 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -1583,31 +1583,6 @@ nsWebShellWindow::ContentRemoved(nsIDocument *aDocument, { } -// This should rightfully be somebody's CONTRACTID? -// Will switch when the "app shell browser component" arrives. -static const char *prefix = "@mozilla.org/appshell/component/browser/window;1"; - -nsresult -nsWebShellWindow::NotifyObservers( const nsString &aTopic, const nsString &someData ) { - nsresult rv = NS_OK; - // Get observer service. - nsIObserverService *svc = 0; - rv = nsServiceManager::GetService( "@mozilla.org/observer-service;1", - NS_GET_IID(nsIObserverService), - (nsISupports**)&svc ); - if ( NS_SUCCEEDED( rv ) && svc ) { - // Notify observers as instructed; the subject is "this" web shell window. - nsCAutoString topic; topic.Assign(prefix); - topic.Append(";"); - topic.AppendWithConversion(aTopic); - rv = svc->NotifyObservers( (nsIWebShellWindow*)this, topic.get(), someData.get() ); - // Release the service. - nsServiceManager::ReleaseService( "@mozilla.org/observer-service;1", svc ); - } else { - } - return rv; -} - // nsIBaseWindow NS_IMETHODIMP nsWebShellWindow::Destroy() { diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.h b/mozilla/xpfe/appshell/src/nsWebShellWindow.h index 586e3f893ca..ee4c7816d45 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.h +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.h @@ -139,8 +139,6 @@ protected: static nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent); - nsresult NotifyObservers( const nsString &aTopic, const nsString &someData ); - nsIWebShell* mWebShell; PRBool mLockedUntilChromeLoad; PRBool mLoadDefaultPage; diff --git a/mozilla/xpfe/appshell/src/nsXULWindow.cpp b/mozilla/xpfe/appshell/src/nsXULWindow.cpp index 519ae7d323d..1c8605645a3 100644 --- a/mozilla/xpfe/appshell/src/nsXULWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsXULWindow.cpp @@ -1865,31 +1865,6 @@ NS_IMETHODIMP nsXULWindow::CreateNewContentWindow(PRInt32 aChromeFlags, return NS_OK; } -// XXX can this switch now? -/// This should rightfully be somebody's CONTRACTID? -// Will switch when the "app shell browser component" arrives. -static const char *prefix = "@mozilla.org/appshell/component/browser/window;1"; - -NS_IMETHODIMP nsXULWindow::NotifyObservers(const PRUnichar* aTopic, - const PRUnichar* aData) -{ - nsCOMPtr service(do_GetService("@mozilla.org/observer-service;1")); - - if(!service) - return NS_ERROR_FAILURE; - - nsCOMPtr - removeme(do_QueryInterface(NS_STATIC_CAST(nsIXULWindow*, this))); - - nsCAutoString topic; topic.Assign(prefix); - topic.Append(";"); - topic.AppendWithConversion(aTopic); - - NS_ENSURE_SUCCESS(service->NotifyObservers(removeme, topic.get(), aData), - NS_ERROR_FAILURE); - return NS_OK; -} - void nsXULWindow::EnableParent(PRBool aEnable) { nsCOMPtr parentWindow; diff --git a/mozilla/xpfe/appshell/src/nsXULWindow.h b/mozilla/xpfe/appshell/src/nsXULWindow.h index 98ffc44795b..dbd4828c5ad 100644 --- a/mozilla/xpfe/appshell/src/nsXULWindow.h +++ b/mozilla/xpfe/appshell/src/nsXULWindow.h @@ -121,7 +121,6 @@ protected: nsIXULWindow **_retval); NS_IMETHOD CreateNewContentWindow(PRInt32 aChromeFlags, nsIXULWindow **_retval); - NS_IMETHOD NotifyObservers(const PRUnichar* aTopic, const PRUnichar* aData); void EnableParent(PRBool aEnable); PRBool ConstrainToZLevel(PRBool aImmediate, nsWindowZ *aPlacement,