| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 ASH_COMMON_WM_IMMERSIVE_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| 6 #define ASH_COMMON_WM_IMMERSIVE_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 |
| 10 namespace views { |
| 11 class View; |
| 12 class Widget; |
| 13 } |
| 14 |
| 15 namespace ash { |
| 16 |
| 17 class WmImmersiveFullscreenControllerDelegate; |
| 18 |
| 19 // Controller for immersive mode. See ImmersiveFullscreenController for details. |
| 20 class ASH_EXPORT WmImmersiveFullscreenController { |
| 21 public: |
| 22 // The enum is used for an enumerated histogram. New items should be only |
| 23 // added to the end. |
| 24 enum WindowType { |
| 25 WINDOW_TYPE_OTHER, |
| 26 WINDOW_TYPE_BROWSER, |
| 27 WINDOW_TYPE_HOSTED_APP, |
| 28 WINDOW_TYPE_PACKAGED_APP, |
| 29 WINDOW_TYPE_COUNT |
| 30 }; |
| 31 |
| 32 virtual ~WmImmersiveFullscreenController() {} |
| 33 |
| 34 // Initializes the controller. Must be called prior to enabling immersive |
| 35 // fullscreen via SetEnabled(). |top_container| is used to keep the |
| 36 // top-of-window views revealed when a child of |top_container| has focus. |
| 37 // |top_container| does not affect which mouse and touch events keep the |
| 38 // top-of-window views revealed. |widget| is the widget to make fullscreen. |
| 39 virtual void Init(WmImmersiveFullscreenControllerDelegate* delegate, |
| 40 views::Widget* widget, |
| 41 views::View* top_container) = 0; |
| 42 |
| 43 // Enables or disables immersive fullscreen. |
| 44 // |window_type| is the type of window which is put in immersive fullscreen. |
| 45 // It is only used for histogramming. |
| 46 virtual void SetEnabled(WindowType window_type, bool enable) = 0; |
| 47 |
| 48 // Returns true if in immersive fullscreen. |
| 49 virtual bool IsEnabled() const = 0; |
| 50 |
| 51 // Returns true if in immersive fullscreen and the top-of-window views are |
| 52 // fully or partially visible. |
| 53 virtual bool IsRevealed() const = 0; |
| 54 }; |
| 55 |
| 56 } // namespace ash |
| 57 |
| 58 #endif // ASH_COMMON_WM_IMMERSIVE_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| OLD | NEW |