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

Side by Side Diff: chrome/browser/ui/immersive_fullscreen_configuration.cc

Issue 16070003: Move immersive fullscreen check into ImmersiveFullscreenConfiguration. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: sync+rebase Created 7 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/immersive_fullscreen_configuration.h" 5 #include "chrome/browser/ui/immersive_fullscreen_configuration.h"
6 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
7 int ImmersiveFullscreenConfiguration::immersive_mode_reveal_delay_ms_ = 200; 35 int ImmersiveFullscreenConfiguration::immersive_mode_reveal_delay_ms_ = 200;
8 int 36 int
9 ImmersiveFullscreenConfiguration::immersive_mode_reveal_x_threshold_pixels_ = 3; 37 ImmersiveFullscreenConfiguration::immersive_mode_reveal_x_threshold_pixels_ = 3;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698