OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 ASH_SHARED_IMMERSIVE_CONTEXT_H_ | 5 #ifndef ASH_SHARED_IMMERSIVE_CONTEXT_H_ |
6 #define ASH_SHARED_IMMERSIVE_CONTEXT_H_ | 6 #define ASH_SHARED_IMMERSIVE_CONTEXT_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
11 class Rect; | 11 class Rect; |
12 } | 12 } |
13 namespace views { | 13 namespace views { |
14 class PointerWatcher; | 14 class PointerWatcher; |
| 15 enum class PointerWatcherEventTypes; |
15 class Widget; | 16 class Widget; |
16 } | 17 } |
17 | 18 |
18 namespace ash { | 19 namespace ash { |
19 | 20 |
20 class ImmersiveFullscreenController; | 21 class ImmersiveFullscreenController; |
21 | 22 |
22 // ImmersiveFullscreenController is used in four distinct environments: ash, | 23 // ImmersiveFullscreenController is used in four distinct environments: ash, |
23 // mash, chrome in ash and chrome in mash. All of these have slightly different | 24 // mash, chrome in ash and chrome in mash. All of these have slightly different |
24 // restrictions. ImmersiveContext enables ImmersiveFullscreenController to be | 25 // restrictions. ImmersiveContext enables ImmersiveFullscreenController to be |
(...skipping 16 matching lines...) Expand all Loading... |
41 // state. | 42 // state. |
42 virtual void OnEnteringOrExitingImmersive( | 43 virtual void OnEnteringOrExitingImmersive( |
43 ImmersiveFullscreenController* controller, | 44 ImmersiveFullscreenController* controller, |
44 bool entering) = 0; | 45 bool entering) = 0; |
45 | 46 |
46 // Returns the bounds of the display the widget is on, in screen coordinates. | 47 // Returns the bounds of the display the widget is on, in screen coordinates. |
47 virtual gfx::Rect GetDisplayBoundsInScreen(views::Widget* widget) = 0; | 48 virtual gfx::Rect GetDisplayBoundsInScreen(views::Widget* widget) = 0; |
48 | 49 |
49 // See WmShell::AddPointerWatcher for details. | 50 // See WmShell::AddPointerWatcher for details. |
50 virtual void AddPointerWatcher(views::PointerWatcher* watcher, | 51 virtual void AddPointerWatcher(views::PointerWatcher* watcher, |
51 bool wants_moves) = 0; | 52 views::PointerWatcherEventTypes events) = 0; |
52 virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0; | 53 virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0; |
53 | 54 |
54 // Returns true if any window has capture. | 55 // Returns true if any window has capture. |
55 virtual bool DoesAnyWindowHaveCapture() = 0; | 56 virtual bool DoesAnyWindowHaveCapture() = 0; |
56 | 57 |
57 // See WmShell::IsMouseEventsEnabled() for details. | 58 // See WmShell::IsMouseEventsEnabled() for details. |
58 virtual bool IsMouseEventsEnabled() = 0; | 59 virtual bool IsMouseEventsEnabled() = 0; |
59 | 60 |
60 protected: | 61 protected: |
61 ImmersiveContext(); | 62 ImmersiveContext(); |
62 virtual ~ImmersiveContext(); | 63 virtual ~ImmersiveContext(); |
63 | 64 |
64 private: | 65 private: |
65 static ImmersiveContext* instance_; | 66 static ImmersiveContext* instance_; |
66 }; | 67 }; |
67 | 68 |
68 } // namespace ash | 69 } // namespace ash |
69 | 70 |
70 #endif // ASH_SHARED_IMMERSIVE_CONTEXT_H_ | 71 #endif // ASH_SHARED_IMMERSIVE_CONTEXT_H_ |
OLD | NEW |