1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/immersive_fullscreen_configuration.h"
7 #if defined(OS_CHROMEOS)
8 #include "ash/ash_switches.h"
9 #include "base/command_line.h"
10 #include "chrome/common/chrome_switches.h"
11 #endif // defined(OS_CHROMEOS)
14 bool ImmersiveFullscreenConfiguration::UseImmersiveFullscreen() {
15 #if defined(OS_CHROMEOS)
16 CommandLine
* command
= CommandLine::ForCurrentProcess();
17 // Kiosk mode needs the whole screen.
18 if (command
->HasSwitch(switches::kKioskMode
))
20 // Immersive fullscreen is on by default. If you change the default you must
21 // change the enable function below and BrowserTest FullscreenBookmarkBar
22 // (which cannot depend on this function due to DEPS).
23 return !command
->HasSwitch(ash::switches::kAshDisableImmersiveFullscreen
);
29 // Implemented here so all the code dealing with flags lives in one place.
30 void ImmersiveFullscreenConfiguration::EnableImmersiveFullscreenForTest() {
31 // Immersive fullscreen is on by default. If we turn it off, this function
32 // will need to add kAshEnableImmersiveFullscreen to the command line.
35 int ImmersiveFullscreenConfiguration::immersive_mode_reveal_delay_ms_
= 200;
37 ImmersiveFullscreenConfiguration::immersive_mode_reveal_x_threshold_pixels_
= 3;