Cleaner fix for making turbo mode dynamic (89504). r=ccarlen sr=ben

This commit is contained in:
blakeross%telocity.com 2001-08-17 00:25:04 +00:00
Родитель 7d73da2c7b
Коммит 64c93bc135
6 изменённых файлов: 9 добавлений и 23 удалений

Просмотреть файл

@ -136,8 +136,7 @@
*
* This interface has these attributes:
* isServerMode - Boolean attribute indicating whether the application
* is running in "server mode" as a result of the
* browser.turbo.enabled pref. Server mode means the
* is running in "server mode." Server mode means the
* application was started to pre-load shared-libraries,
* initialize services, and open a hidden Navigator window
* in order to quickly surface that window when the user
@ -146,8 +145,6 @@
* sense there) and is intended to be initiated from the
* Windows startup folder at system initialization.
*
* isStartupServerMode - Boolean attribute indicated whether the app is in
* "server mode" as a result of the -turbo cmdline arg.
*
* needsProfileUI - Boolean attribute used when running in "server mode."
* If the "server mode" caused profile dialogs to be
@ -171,7 +168,6 @@ interface nsINativeAppSupport : nsISupports {
// Server mode.
attribute boolean isServerMode;
readonly attribute boolean isStartupServerMode;
void startServerMode();
attribute boolean needsProfileUI;
};

Просмотреть файл

@ -830,7 +830,7 @@ static nsresult Ensure1Window( nsICmdLineService* cmdLineArgs)
PRBool serverMode = PR_FALSE;
rv = GetNativeAppSupport(getter_AddRefs(nativeApp));
// Create special Nav window.
if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(nativeApp->GetIsStartupServerMode(&serverMode)) && serverMode) {
if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(nativeApp->GetIsServerMode(&serverMode)) && serverMode) {
nativeApp->StartServerMode();
return NS_OK;
}
@ -1275,8 +1275,11 @@ static nsresult main1(int argc, char* argv[], nsISupports *nativeApp )
nsCOMPtr<nsIPref> prefs(do_GetService(NS_PREF_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv) && prefs) {
PRBool serverMode = PR_FALSE;
prefs->GetBoolPref(TURBO_PREF, &serverMode);
nativeApps->SetIsServerMode(serverMode);
nativeApps->GetIsServerMode(&serverMode);
if (!serverMode) { // okay, so it's not -turbo
prefs->GetBoolPref(TURBO_PREF, &serverMode);
nativeApps->SetIsServerMode(serverMode);
}
}
}

Просмотреть файл

@ -26,7 +26,6 @@ nsNativeAppSupportBase::nsNativeAppSupportBase()
: mRefCnt( 0 ),
mSplash( 0 ),
mServerMode( PR_FALSE ),
mStartupServerMode( PR_FALSE ),
mNeedsProfileUI( PR_FALSE ) {
}
@ -94,13 +93,6 @@ nsNativeAppSupportBase::GetIsServerMode(PRBool *aIsServerMode) {
return NS_OK;
}
NS_IMETHODIMP
nsNativeAppSupportBase::GetIsStartupServerMode(PRBool *aIsStartupServerMode) {
NS_ENSURE_ARG( aIsStartupServerMode );
*aIsStartupServerMode = mStartupServerMode;
return NS_OK;
}
NS_IMETHODIMP
nsNativeAppSupportBase::GetNeedsProfileUI(PRBool *aNeedsProfileUI) {
NS_ENSURE_ARG_POINTER(aNeedsProfileUI);

Просмотреть файл

@ -53,7 +53,6 @@ public:
nsrefcnt mRefCnt;
nsCOMPtr<nsISplashScreen> mSplash;
PRBool mServerMode;
PRBool mStartupServerMode;
PRBool mNeedsProfileUI;
}; // class nsSplashScreenWin

Просмотреть файл

@ -585,7 +585,7 @@ nsNativeAppSupportWin::CheckConsole() {
||
strcmp( "/server", __argv[i] ) == 0 ) {
// Start in server mode (and suppress splash screen).
mStartupServerMode = PR_TRUE;
mServerMode = PR_TRUE;
__argv[i] = "-nosplash"; // Bit of a hack, but it works!
// Ignore other args.
break;

Просмотреть файл

@ -136,8 +136,7 @@
*
* This interface has these attributes:
* isServerMode - Boolean attribute indicating whether the application
* is running in "server mode" as a result of the
* browser.turbo.enabled pref. Server mode means the
* is running in "server mode." Server mode means the
* application was started to pre-load shared-libraries,
* initialize services, and open a hidden Navigator window
* in order to quickly surface that window when the user
@ -146,8 +145,6 @@
* sense there) and is intended to be initiated from the
* Windows startup folder at system initialization.
*
* isStartupServerMode - Boolean attribute indicated whether the app is in
* "server mode" as a result of the -turbo cmdline arg.
*
* needsProfileUI - Boolean attribute used when running in "server mode."
* If the "server mode" caused profile dialogs to be
@ -171,7 +168,6 @@ interface nsINativeAppSupport : nsISupports {
// Server mode.
attribute boolean isServerMode;
readonly attribute boolean isStartupServerMode;
void startServerMode();
attribute boolean needsProfileUI;
};