Bug 337917 Make consumers stop using cids from other modules

r=neil sr=darin
This commit is contained in:
timeless%mozdev.org 2006-06-03 23:42:13 +00:00
parent 52a93bff56
commit 4fceb5193b
5 changed files with 10 additions and 21 deletions

View File

@ -293,7 +293,6 @@ static NS_DEFINE_CID(kHTTPHandlerCID, NS_HTTPPROTOCOLHANDLER_CID);
static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
static NS_DEFINE_CID(kCharsetConverterManagerCID,
NS_ICHARSETCONVERTERMANAGER_CID);
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID); // For window.find()
static const char sJSStackContractID[] = "@mozilla.org/js/xpc/ContextStack;1";
@ -4717,7 +4716,7 @@ nsGlobalWindow::FindInternal(const nsAString& aStr, PRBool caseSensitive,
if (aStr.IsEmpty() || showDialog) {
// See if the find dialog is already up using nsIWindowMediator
nsCOMPtr<nsIWindowMediator> windowMediator =
do_GetService(kWindowMediatorCID);
do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
nsCOMPtr<nsIDOMWindowInternal> findDialog;

View File

@ -72,9 +72,6 @@
#include "nsIContentViewer.h"
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
class nsJSThunk : public nsIInputStream
{
@ -312,7 +309,7 @@ nsresult nsJSThunk::BringUpConsole(nsIDOMWindow *aDomWindow)
// First, get the Window Mediator service.
nsCOMPtr<nsIWindowMediator> windowMediator =
do_GetService(kWindowMediatorCID, &rv);
do_GetService(NS_WINDOWMEDIATOR_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;

View File

@ -102,7 +102,6 @@ nsIAtom* nsChromeRegistry::sCPrefix; // atom for "c"
#define kChromeFileName NS_LITERAL_CSTRING("chrome.rdf")
#define kInstalledChromeFileName NS_LITERAL_CSTRING("installed-chrome.txt")
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kRDFXMLDataSourceCID, NS_RDFXMLDATASOURCE_CID);
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
@ -1311,7 +1310,7 @@ static void FlushSkinBindingsForWindow(nsIDOMWindowInternal* aWindow)
// XXXbsmedberg: move this to nsIWindowMediator
NS_IMETHODIMP nsChromeRegistry::RefreshSkins()
{
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID));
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
if (!windowMediator)
return NS_OK;
@ -2846,7 +2845,7 @@ nsChromeRegistry::ReloadChrome()
nsresult rv = NS_OK;
// Get the window mediator
nsCOMPtr<nsIWindowMediator> windowMediator = do_GetService(kWindowMediatorCID, &rv);
nsCOMPtr<nsIWindowMediator> windowMediator = do_GetService(NS_WINDOWMEDIATOR_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;

View File

@ -791,8 +791,6 @@ int nsWindow::ResizeHandler( PtWidget_t *widget, void *data, PtCallbackInfo_t *c
}
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
/* catch an Ph_EV_INFO event when the graphics mode has changed */
int nsWindow::EvInfo( PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo ) {
@ -805,7 +803,7 @@ int nsWindow::EvInfo( PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo )
pPrefs->GetBoolPref("browser.display.internaluse.graphics_changed", &displayInternalChange);
pPrefs->SetBoolPref("browser.display.internaluse.graphics_changed", !displayInternalChange);
}
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID));
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
NS_ENSURE_TRUE(windowMediator, NS_ERROR_FAILURE);
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;

View File

@ -71,10 +71,6 @@
using namespace nsWindowUtils;
// CIDs
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
/*----------------------------------------------------------------------------
GetXULWindowFromWindowPtr
@ -91,7 +87,7 @@ static void GetXULWindowFromWindowPtr(WindowPtr inWindowPtr, nsIXULWindow **outX
if (!inWindowPtr)
ThrowOSErr(paramErr);
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID));
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
ThrowErrIfNil(windowMediator, paramErr);
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;
@ -216,7 +212,7 @@ static TWindowKind GetXULWindowKind(nsIXULWindow *inXULWindow)
----------------------------------------------------------------------------*/
long nsWindowUtils::CountWindowsOfKind(TWindowKind windowKind)
{
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID));
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
ThrowErrIfNil(windowMediator, paramErr);
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;
@ -253,7 +249,7 @@ long nsWindowUtils::CountWindowsOfKind(TWindowKind windowKind)
WindowPtr nsWindowUtils::GetNamedOrFrontmostWindow(TWindowKind windowKind, const char* windowName)
{
// Search for window with the desired kind and name.
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID));
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
ThrowErrIfNil(windowMediator, paramErr);
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;
@ -317,7 +313,7 @@ WindowPtr nsWindowUtils::GetNamedOrFrontmostWindow(TWindowKind windowKind, const
WindowPtr nsWindowUtils::GetIndexedWindowOfKind(TWindowKind windowKind, TAEListIndex index)
{
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID));
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
ThrowErrIfNil(windowMediator, paramErr);
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;
@ -364,7 +360,7 @@ WindowPtr nsWindowUtils::GetIndexedWindowOfKind(TWindowKind windowKind, TAEListI
TAEListIndex nsWindowUtils::GetWindowIndex(TWindowKind windowKind, WindowPtr theWindow)
{
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID));
nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(NS_WINDOWMEDIATOR_CONTRACTID));
ThrowErrIfNil(windowMediator, paramErr);
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;