Commit 3e8d2d54 authored by pkasting@chromium.org's avatar pkasting@chromium.org

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
parent 758fed1b
...@@ -552,13 +552,17 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, ...@@ -552,13 +552,17 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile,
RecordLaunchModeHistogram(LM_AS_WEBAPP); 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) #if defined(OS_WIN)
// Print the selected page if the command line switch exists. Note that the // Print the selected page if the command line switch exists. Note that the
// current selected tab would be the page which will be printed. // current selected tab would be the page which will be printed.
if (command_line_.HasSwitch(switches::kPrint)) { if (command_line_.HasSwitch(switches::kPrint))
Browser* browser = BrowserList::GetLastActive(); BrowserList::GetLastActive()->Print();
browser->Print();
}
#endif #endif
// If we're recording or playing back, startup the EventRecorder now // If we're recording or playing back, startup the EventRecorder now
...@@ -742,12 +746,6 @@ Browser* BrowserInit::LaunchWithProfile::OpenTabsInBrowser( ...@@ -742,12 +746,6 @@ Browser* BrowserInit::LaunchWithProfile::OpenTabsInBrowser(
#endif #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; bool first_tab = true;
for (size_t i = 0; i < tabs.size(); ++i) { for (size_t i = 0; i < tabs.size(); ++i) {
// We skip URLs that we'd have to launch an external protocol handler for. // We skip URLs that we'd have to launch an external protocol handler for.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment