| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; | 92 virtual void RemoveOverviewModeObserver(WmOverviewModeObserver* observer) = 0; |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 static WmGlobals* instance_; | 95 static WmGlobals* instance_; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace wm | 98 } // namespace wm |
| 99 } // namespace ash | 99 } // namespace ash |
| 100 | 100 |
| 101 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ | 101 #endif // ASH_WM_COMMON_WM_GLOBALS_H_ |
| OLD | NEW |