Chromium Code Reviews| Index: ash/common/wm/immersive/wm_immersive_fullscreen_controller.h |
| diff --git a/ash/common/wm/immersive/wm_immersive_fullscreen_controller.h b/ash/common/wm/immersive/wm_immersive_fullscreen_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..75c540e0923647a2bf36f4945106dc0823d4d6f2 |
| --- /dev/null |
| +++ b/ash/common/wm/immersive/wm_immersive_fullscreen_controller.h |
| @@ -0,0 +1,58 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
|
James Cook
2016/08/05 23:40:36
optional thought: I'm not sure it's worth it to cr
sky
2016/08/06 15:32:46
Ya, I don't particularly like the depth either. OT
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_COMMON_WM_IMMERSIVE_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| +#define ASH_COMMON_WM_IMMERSIVE_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |
| + |
| +#include "ash/ash_export.h" |
| + |
| +namespace views { |
| +class View; |
| +class Widget; |
| +} |
| + |
| +namespace ash { |
| + |
| +class WmImmersiveFullscreenControllerDelegate; |
| + |
| +// Controller for immersive mode. See ImmersiveFullscreenController for details. |
| +class ASH_EXPORT WmImmersiveFullscreenController { |
| + public: |
| + // The enum is used for an enumerated histogram. New items should be only |
| + // added to the end. |
| + enum WindowType { |
| + WINDOW_TYPE_OTHER, |
| + WINDOW_TYPE_BROWSER, |
| + WINDOW_TYPE_HOSTED_APP, |
| + WINDOW_TYPE_PACKAGED_APP, |
| + WINDOW_TYPE_COUNT |
| + }; |
| + |
| + virtual ~WmImmersiveFullscreenController() {} |
| + |
| + // Initializes the controller. Must be called prior to enabling immersive |
| + // fullscreen via SetEnabled(). |top_container| is used to keep the |
| + // top-of-window views revealed when a child of |top_container| has focus. |
| + // |top_container| does not affect which mouse and touch events keep the |
| + // top-of-window views revealed. |
| + virtual void Init(WmImmersiveFullscreenControllerDelegate* delegate, |
| + views::Widget* widget, |
|
James Cook
2016/08/05 23:40:36
nit: Document or rename this to indicate which wid
sky
2016/08/06 15:32:46
Done.
|
| + views::View* top_container) = 0; |
| + |
| + // Enables or disables immersive fullscreen. |
| + // |window_type| is the type of window which is put in immersive fullscreen. |
| + // It is only used for histogramming. |
| + virtual void SetEnabled(WindowType window_type, bool enable) = 0; |
| + |
| + // Returns true if in immersive fullscreen. |
| + virtual bool IsEnabled() const = 0; |
| + |
| + // Returns true if in immersive fullscreen and the top-of-window views are |
| + // fully or partially visible. |
| + virtual bool IsRevealed() const = 0; |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_COMMON_WM_IMMERSIVE_WM_IMMERSIVE_FULLSCREEN_CONTROLLER_H_ |