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