Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1282)

Unified Diff: chrome/browser/browser_init.cc

Issue 2847090: Fix --kiosk to work regardless of the startup pref setting or supplied URLs. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | chrome/browser/browser_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698