Index: chrome/browser/browser_init.cc |
=================================================================== |
--- chrome/browser/browser_init.cc (revision 54588) |
+++ chrome/browser/browser_init.cc (working copy) |
@@ -552,14 +552,20 @@ |
} else { |
RecordLaunchModeHistogram(LM_AS_WEBAPP); |
} |
+ // After this point, BrowserList::GetLastActive() should be non-NULL on all |
+ // platforms until there are no more Browsers. |
+#if !defined(OS_MACOSX) |
+ // In kiosk mode, we want to always be fullscreen, so switch to that now. |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) |
+ BrowserList::GetLastActive()->ToggleFullscreenMode(); |
+#endif |
+ |
#if defined(OS_WIN) |
// Print the selected page if the command line switch exists. Note that the |
// current selected tab would be the page which will be printed. |
- if (command_line_.HasSwitch(switches::kPrint)) { |
- Browser* browser = BrowserList::GetLastActive(); |
- browser->Print(); |
- } |
+ if (command_line_.HasSwitch(switches::kPrint)) |
+ BrowserList::GetLastActive()->Print(); |
#endif |
// If we're recording or playing back, startup the EventRecorder now |
@@ -743,12 +749,6 @@ |
#endif |
} |
-#if !defined(OS_MACOSX) |
- // In kiosk mode, we want to always be fullscreen, so switch to that now. |
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) |
- browser->ToggleFullscreenMode(); |
-#endif |
- |
bool first_tab = true; |
for (size_t i = 0; i < tabs.size(); ++i) { |
// We skip URLs that we'd have to launch an external protocol handler for. |