nsIPref is no longer passed around through inits on webshell, content viewers and presContext. In places where it is needed, it can be retrieved from the service manager. I removed a number of the getters and setters for prefs as the prefs will be the same from the service manager so we don't need getters. r=waterson a=rickg

git-svn-id: svn://10.0.0.236/trunk@62038 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-03-02 07:13:02 +00:00
parent 7932902c0f
commit 495826cccc
39 changed files with 58 additions and 264 deletions

View File

@@ -338,24 +338,6 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
docShellAsItem->SetTreeOwner(mChromeTreeOwner);
docShellAsItem->SetItemType(nsIDocShellTreeItem::typeChrome);
/*
* XXX: How should preferences be supplied to the nsWebShellWindow?
* Should there be the notion of a global preferences service?
* Or should there be many preferences components based on
* the user profile...
*/
// Initialize the webshell with the preferences service
nsIPref *prefs;
rv = nsServiceManager::GetService(kPrefCID,
NS_GET_IID(nsIPref),
(nsISupports **)&prefs);
if (NS_SUCCEEDED(rv)) {
// Set the prefs in the outermost webshell.
mWebShell->SetPrefs(prefs);
nsServiceManager::ReleaseService(kPrefCID, prefs);
}
if (nsnull != aUrl) {
char *tmpStr = NULL;
nsAutoString urlString;
@@ -1753,7 +1735,6 @@ nsWebShellWindow::DocumentWillBeDestroyed(nsIDocument *aDocument)
/**************** nsIBrowserWindow interface ********************/
NS_IMETHODIMP nsWebShellWindow::Init(nsIAppShell* aAppShell,
nsIPref* aPrefs,
const nsRect& aBounds,
PRUint32 aChromeMask,
PRBool aAllowPlugins)