ifdef out some turbo stuff in Firefox. r=bryner sr=ben

This commit is contained in:
blakeross%telocity.com 2004-02-16 04:13:17 +00:00
Родитель ad32baf4be
Коммит 87186d9489
1 изменённых файлов: 12 добавлений и 8 удалений

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

@ -863,6 +863,7 @@ struct MessageWindow {
nsCOMPtr<nsIDOMWindowInternal> win; nsCOMPtr<nsIDOMWindowInternal> win;
GetMostRecentWindow( 0, getter_AddRefs( win ) ); GetMostRecentWindow( 0, getter_AddRefs( win ) );
return win ? (long)hwndForDOMWindow( win ) : 0; return win ? (long)hwndForDOMWindow( win ) : 0;
#ifndef MOZ_PHOENIX
} else if ( msg == WM_USER ) { } else if ( msg == WM_USER ) {
if ( lp == WM_RBUTTONUP ) { if ( lp == WM_RBUTTONUP ) {
// Show menu with Exit disabled/enabled appropriately. // Show menu with Exit disabled/enabled appropriately.
@ -956,6 +957,7 @@ struct MessageWindow {
(void)nsNativeAppSupportWin::HandleRequest( (LPBYTE)"mozilla" ); (void)nsNativeAppSupportWin::HandleRequest( (LPBYTE)"mozilla" );
} }
return TRUE; return TRUE;
#endif
} else if ( msg == WM_QUERYENDSESSION ) { } else if ( msg == WM_QUERYENDSESSION ) {
// Invoke "-killAll" cmd line handler. That will close all open windows, // Invoke "-killAll" cmd line handler. That will close all open windows,
// and display dialog asking whether to save/don't save/cancel. If the // and display dialog asking whether to save/don't save/cancel. If the
@ -1082,7 +1084,7 @@ nsNativeAppSupportWin::FindTopic( HSZ topic ) {
// Utility function that determines if we're handling http Internet shortcuts. // Utility function that determines if we're handling http Internet shortcuts.
static PRBool handlingHTTP() { static PRBool handlingHTTP() {
PRBool result = PR_FALSE; // Answer no if an error occurs. PRBool result = PR_FALSE; // Answer no if an error occurs.
// See if we're the "default browser" (i.e., handling http Internet shortcuts) // See if we're the "default browser" (i.e., handling http Internet shortcuts)
nsCOMPtr<nsIWindowsHooks> winhooks( do_GetService( NS_IWINDOWSHOOKS_CONTRACTID ) ); nsCOMPtr<nsIWindowsHooks> winhooks( do_GetService( NS_IWINDOWSHOOKS_CONTRACTID ) );
if ( winhooks ) { if ( winhooks ) {
nsCOMPtr<nsIWindowsHooksSettings> settings; nsCOMPtr<nsIWindowsHooksSettings> settings;
@ -1102,12 +1104,15 @@ static PRBool handlingHTTP() {
// First, turn off all the other protocols. // First, turn off all the other protocols.
settings->SetIsHandlingHTTPS( PR_FALSE ); settings->SetIsHandlingHTTPS( PR_FALSE );
#ifndef MOZ_PHOENIX
settings->SetIsHandlingFTP( PR_FALSE ); settings->SetIsHandlingFTP( PR_FALSE );
settings->SetIsHandlingCHROME( PR_FALSE ); settings->SetIsHandlingCHROME( PR_FALSE );
settings->SetIsHandlingGOPHER( PR_FALSE ); settings->SetIsHandlingGOPHER( PR_FALSE );
#endif
// Next, all the file types. // Next, all the file types.
settings->SetIsHandlingHTML( PR_FALSE ); settings->SetIsHandlingHTML( PR_FALSE );
settings->SetIsHandlingXHTML( PR_FALSE );
#ifndef MOZ_PHOENIX
settings->SetIsHandlingJPEG( PR_FALSE ); settings->SetIsHandlingJPEG( PR_FALSE );
settings->SetIsHandlingGIF( PR_FALSE ); settings->SetIsHandlingGIF( PR_FALSE );
settings->SetIsHandlingPNG( PR_FALSE ); settings->SetIsHandlingPNG( PR_FALSE );
@ -1115,9 +1120,8 @@ static PRBool handlingHTTP() {
settings->SetIsHandlingBMP( PR_FALSE ); settings->SetIsHandlingBMP( PR_FALSE );
settings->SetIsHandlingICO( PR_FALSE ); settings->SetIsHandlingICO( PR_FALSE );
settings->SetIsHandlingXML( PR_FALSE ); settings->SetIsHandlingXML( PR_FALSE );
settings->SetIsHandlingXHTML( PR_FALSE );
settings->SetIsHandlingXUL( PR_FALSE ); settings->SetIsHandlingXUL( PR_FALSE );
#endif
// Now test the HTTP setting in the registry. // Now test the HTTP setting in the registry.
settings->GetRegistryMatches( &result ); settings->GetRegistryMatches( &result );
} }
@ -1251,7 +1255,7 @@ nsNativeAppSupportWin::Quit() {
// created by the same thread. // created by the same thread.
MessageWindow mw; MessageWindow mw;
mw.Destroy(); mw.Destroy();
if ( mInstance ) { if ( mInstance ) {
// Undo registry setting if we need to. // Undo registry setting if we need to.
if ( mSupportingDDEExec && handlingHTTP() ) { if ( mSupportingDDEExec && handlingHTTP() ) {
@ -2636,7 +2640,7 @@ nsNativeAppSupportWin::OnLastWindowClosing() {
// Turn off MessageWindow so the other process can't see us. // Turn off MessageWindow so the other process can't see us.
MessageWindow mw; MessageWindow mw;
mw.Destroy(); mw.Destroy();
// Launch another instance. // Launch another instance.
char buffer[ _MAX_PATH ]; char buffer[ _MAX_PATH ];
// Same application as this one. // Same application as this one.
@ -2646,7 +2650,7 @@ nsNativeAppSupportWin::OnLastWindowClosing() {
nsCAutoString cmdLine( buffer ); nsCAutoString cmdLine( buffer );
// The new process must run in turbo mode (no splash screen, no window, etc.). // The new process must run in turbo mode (no splash screen, no window, etc.).
cmdLine.Append( " -turbo" ); cmdLine.Append( " -turbo" );
// Now do the Win32 stuff... // Now do the Win32 stuff...
STARTUPINFO startupInfo; STARTUPINFO startupInfo;
::GetStartupInfo( &startupInfo ); ::GetStartupInfo( &startupInfo );
@ -2661,7 +2665,7 @@ nsNativeAppSupportWin::OnLastWindowClosing() {
0, 0,
&startupInfo, &startupInfo,
&processInfo ); &processInfo );
// Turn off turbo mode and quit the application. // Turn off turbo mode and quit the application.
SetIsServerMode( PR_FALSE ); SetIsServerMode( PR_FALSE );
appShell->Quit(nsIAppShellService::eAttemptQuit); appShell->Quit(nsIAppShellService::eAttemptQuit);