diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 23:50:37 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 23:50:37 +0000 |
commit | 3e8d2d54f16890e9ca02244883ab35d72721da3c (patch) | |
tree | 88ae39093f9f23939c6137f6a4ffb8ddd7f1b303 /chrome | |
parent | 758fed1b99052dd570ebf9cc340a2b13e326554f (diff) | |
download | chromium_src-3e8d2d54f16890e9ca02244883ab35d72721da3c.zip chromium_src-3e8d2d54f16890e9ca02244883ab35d72721da3c.tar.gz chromium_src-3e8d2d54f16890e9ca02244883ab35d72721da3c.tar.bz2 |
Fix --kiosk to work regardless of the startup pref setting or supplied URLs.
BUG=none
TEST=Set Chrome to "open windows and tabs from last time", then run with --kiosk. Should start in kiosk mode (fullscreen, no status bubble).
Review URL: http://codereview.chromium.org/3061026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_init.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index c645420..967b454 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -552,13 +552,17 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, RecordLaunchModeHistogram(LM_AS_WEBAPP); } +#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 @@ -742,12 +746,6 @@ Browser* BrowserInit::LaunchWithProfile::OpenTabsInBrowser( #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. |