| 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 |
| 12 static int immersive_mode_reveal_delay_ms() { | 16 static int immersive_mode_reveal_delay_ms() { |
| 13 return immersive_mode_reveal_delay_ms_; | 17 return immersive_mode_reveal_delay_ms_; |
| 14 } | 18 } |
| 15 static void set_immersive_mode_reveal_delay_ms(int val) { | 19 static void set_immersive_mode_reveal_delay_ms(int val) { |
| 16 immersive_mode_reveal_delay_ms_ = val; | 20 immersive_mode_reveal_delay_ms_ = val; |
| 17 } | 21 } |
| 18 | 22 |
| 19 static int immersive_mode_reveal_x_threshold_pixels() { | 23 static int immersive_mode_reveal_x_threshold_pixels() { |
| 20 return immersive_mode_reveal_x_threshold_pixels_; | 24 return immersive_mode_reveal_x_threshold_pixels_; |
| 21 } | 25 } |
| 22 static void set_immersive_mode_reveal_x_threshold_pixels(int val) { | 26 static void set_immersive_mode_reveal_x_threshold_pixels(int val) { |
| 23 immersive_mode_reveal_x_threshold_pixels_ = val; | 27 immersive_mode_reveal_x_threshold_pixels_ = val; |
| 24 } | 28 } |
| 25 | 29 |
| 26 private: | 30 private: |
| 27 // The time after which the edge trigger fires and top-chrome is revealed in | 31 // The time after which the edge trigger fires and top-chrome is revealed in |
| 28 // immersive fullscreen. This is after the mouse stops moving. | 32 // immersive fullscreen. This is after the mouse stops moving. |
| 29 static int immersive_mode_reveal_delay_ms_; | 33 static int immersive_mode_reveal_delay_ms_; |
| 30 | 34 |
| 31 // Threshold for horizontal mouse movement at the top of the screen for the | 35 // 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 | 36 // 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 | 37 // user to trigger a reveal even if their fingers are not completely still on |
| 34 // the trackpad or mouse. | 38 // the trackpad or mouse. |
| 35 static int immersive_mode_reveal_x_threshold_pixels_; | 39 static int immersive_mode_reveal_x_threshold_pixels_; |
| 36 | 40 |
| 37 DISALLOW_IMPLICIT_CONSTRUCTORS(ImmersiveFullscreenConfiguration); | 41 DISALLOW_IMPLICIT_CONSTRUCTORS(ImmersiveFullscreenConfiguration); |
| 38 }; | 42 }; |
| 39 | 43 |
| 40 #endif // CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ | 44 #endif // CHROME_BROWSER_UI_IMMERSIVE_FULLSCREEN_CONFIGURATION_H_ |
| OLD | NEW |