OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ | 5 #ifndef CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ |
6 #define CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ | 6 #define CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 class ImmersiveFullscreenConfiguration { | 10 class ImmersiveFullscreenConfiguration { |
11 public: | 11 public: |
| 12 // Returns true if immersive mode should be used for fullscreen based on |
| 13 // command line flags. |
| 14 static bool UseImmersiveFullscreen(); |
| 15 |
| 16 static void EnableImmersiveFullscreenForTest(); |
| 17 |
12 static int immersive_mode_reveal_delay_ms() { | 18 static int immersive_mode_reveal_delay_ms() { |
13 return immersive_mode_reveal_delay_ms_; | 19 return immersive_mode_reveal_delay_ms_; |
14 } | 20 } |
15 static void set_immersive_mode_reveal_delay_ms(int val) { | 21 static void set_immersive_mode_reveal_delay_ms(int val) { |
16 immersive_mode_reveal_delay_ms_ = val; | 22 immersive_mode_reveal_delay_ms_ = val; |
17 } | 23 } |
18 | 24 |
19 static int immersive_mode_reveal_x_threshold_pixels() { | 25 static int immersive_mode_reveal_x_threshold_pixels() { |
20 return immersive_mode_reveal_x_threshold_pixels_; | 26 return immersive_mode_reveal_x_threshold_pixels_; |
21 } | 27 } |
22 static void set_immersive_mode_reveal_x_threshold_pixels(int val) { | 28 static void set_immersive_mode_reveal_x_threshold_pixels(int val) { |
23 immersive_mode_reveal_x_threshold_pixels_ = val; | 29 immersive_mode_reveal_x_threshold_pixels_ = val; |
24 } | 30 } |
25 | 31 |
26 private: | 32 private: |
27 // The time after which the edge trigger fires and top-chrome is revealed in | 33 // The time after which the edge trigger fires and top-chrome is revealed in |
28 // immersive fullscreen. This is after the mouse stops moving. | 34 // immersive fullscreen. This is after the mouse stops moving. |
29 static int immersive_mode_reveal_delay_ms_; | 35 static int immersive_mode_reveal_delay_ms_; |
30 | 36 |
31 // Threshold for horizontal mouse movement at the top of the screen for the | 37 // Threshold for horizontal mouse movement at the top of the screen for the |
32 // mouse to be considered "moving" in immersive fullscreen. This allows the | 38 // mouse to be considered "moving" in immersive fullscreen. This allows the |
33 // user to trigger a reveal even if their fingers are not completely still on | 39 // user to trigger a reveal even if their fingers are not completely still on |
34 // the trackpad or mouse. | 40 // the trackpad or mouse. |
35 static int immersive_mode_reveal_x_threshold_pixels_; | 41 static int immersive_mode_reveal_x_threshold_pixels_; |
36 | 42 |
37 DISALLOW_IMPLICIT_CONSTRUCTORS(ImmersiveFullscreenConfiguration); | 43 DISALLOW_IMPLICIT_CONSTRUCTORS(ImmersiveFullscreenConfiguration); |
38 }; | 44 }; |
39 | 45 |
40 #endif // CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ | 46 #endif // CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ |
OLD | NEW |