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_WM_COMMON_WM_GLOBALS_H_ | 5 #ifndef ASH_WM_COMMON_WM_GLOBALS_H_ |
6 #define ASH_WM_COMMON_WM_GLOBALS_H_ | 6 #define ASH_WM_COMMON_WM_GLOBALS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "ash/wm/common/ash_wm_common_export.h" | 13 #include "ash/ash_export.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class Rect; | 16 class Rect; |
17 } | 17 } |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 | 20 |
21 class WindowResizer; | 21 class WindowResizer; |
22 | 22 |
23 namespace wm { | 23 namespace wm { |
24 | 24 |
25 class WindowState; | 25 class WindowState; |
26 class WmActivationObserver; | 26 class WmActivationObserver; |
27 class WmDisplayObserver; | 27 class WmDisplayObserver; |
28 class WmOverviewModeObserver; | 28 class WmOverviewModeObserver; |
29 class WmWindow; | 29 class WmWindow; |
30 | 30 |
31 enum class WmUserMetricsAction; | 31 enum class WmUserMetricsAction; |
32 | 32 |
33 // Used for accessing global state. | 33 // Used for accessing global state. |
34 class ASH_WM_COMMON_EXPORT WmGlobals { | 34 class ASH_EXPORT WmGlobals { |
35 public: | 35 public: |
36 virtual ~WmGlobals() {} | 36 virtual ~WmGlobals() {} |
37 | 37 |
38 // This is necessary for a handful of places that is difficult to plumb | 38 // This is necessary for a handful of places that is difficult to plumb |
39 // through context. | 39 // through context. |
40 static void Set(WmGlobals* instance); | 40 static void Set(WmGlobals* instance); |
41 static WmGlobals* Get(); | 41 static WmGlobals* Get(); |
42 | 42 |
43 virtual WmWindow* GetFocusedWindow() = 0; | 43 virtual WmWindow* GetFocusedWindow() = 0; |
44 virtual WmWindow* GetActiveWindow() = 0; | 44 virtual WmWindow* GetActiveWindow() = 0; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; | 97 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; |
98 | 98 |
99 private: | 99 private: |
100 static WmGlobals* instance_; | 100 static WmGlobals* instance_; |
101 }; | 101 }; |
102 | 102 |
103 } // namespace wm | 103 } // namespace wm |
104 } // namespace ash | 104 } // namespace ash |
105 | 105 |
106 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ | 106 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ |
OLD | NEW |