Home | History | Annotate | Download | only in ui
      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.
      4 
      5 #include "chrome/browser/ui/immersive_fullscreen_configuration.h"
      6 
      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)
     12 
     13 // static
     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))
     19     return false;
     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);
     24 #endif
     25   return false;
     26 }
     27 
     28 // static
     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.
     33 }
     34 
     35 int ImmersiveFullscreenConfiguration::immersive_mode_reveal_delay_ms_ = 200;
     36 int
     37 ImmersiveFullscreenConfiguration::immersive_mode_reveal_x_threshold_pixels_ = 3;
     38