| 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_WINDOW_H_ | 5 #ifndef ASH_WM_COMMON_WM_WINDOW_H_ |
| 6 #define ASH_WM_COMMON_WM_WINDOW_H_ | 6 #define ASH_WM_COMMON_WM_WINDOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/wm/common/ash_wm_common_export.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "ui/base/ui_base_types.h" | 13 #include "ui/base/ui_base_types.h" |
| 14 #include "ui/wm/core/window_animations.h" | 14 #include "ui/wm/core/window_animations.h" |
| 15 #include "ui/wm/public/window_types.h" | 15 #include "ui/wm/public/window_types.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Display; | 18 class Display; |
| 19 class Point; | 19 class Point; |
| 20 class Rect; | 20 class Rect; |
| 21 class Size; | 21 class Size; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace display { | 24 namespace display { |
| 25 using Display = gfx::Display; | 25 using Display = gfx::Display; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace ui { | 28 namespace ui { |
| 29 class Layer; | 29 class Layer; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace views { | |
| 33 class Widget; | |
| 34 } | |
| 35 | |
| 36 namespace ash { | 32 namespace ash { |
| 37 namespace wm { | 33 namespace wm { |
| 38 | 34 |
| 39 class WMEvent; | 35 class WMEvent; |
| 40 class WmGlobals; | 36 class WmGlobals; |
| 41 class WmLayoutManager; | 37 class WmLayoutManager; |
| 42 class WmRootWindowController; | 38 class WmRootWindowController; |
| 43 class WmWindowObserver; | 39 class WmWindowObserver; |
| 44 enum class WmWindowProperty; | 40 enum class WmWindowProperty; |
| 45 class WindowState; | 41 class WindowState; |
| 46 | 42 |
| 47 // This class exists as a porting layer to allow ash/wm to work with | 43 // This class exists as a porting layer to allow ash/wm to work with |
| 48 // aura::Window | 44 // aura::Window |
| 49 // or mus::Window. See aura::Window for details on the functions. | 45 // or mus::Window. See aura::Window for details on the functions. |
| 50 class ASH_EXPORT WmWindow { | 46 class ASH_WM_COMMON_EXPORT WmWindow { |
| 51 public: | 47 public: |
| 52 static WmWindow* Get(views::Widget* widget); | |
| 53 | |
| 54 WmWindow* GetRootWindow() { | 48 WmWindow* GetRootWindow() { |
| 55 return const_cast<WmWindow*>( | 49 return const_cast<WmWindow*>( |
| 56 const_cast<const WmWindow*>(this)->GetRootWindow()); | 50 const_cast<const WmWindow*>(this)->GetRootWindow()); |
| 57 } | 51 } |
| 58 virtual const WmWindow* GetRootWindow() const = 0; | 52 virtual const WmWindow* GetRootWindow() const = 0; |
| 59 virtual WmRootWindowController* GetRootWindowController() = 0; | 53 virtual WmRootWindowController* GetRootWindowController() = 0; |
| 60 | 54 |
| 61 // TODO(sky): fix constness. | 55 // TODO(sky): fix constness. |
| 62 virtual WmGlobals* GetGlobals() const = 0; | 56 virtual WmGlobals* GetGlobals() const = 0; |
| 63 | 57 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 virtual void RemoveObserver(WmWindowObserver* observer) = 0; | 196 virtual void RemoveObserver(WmWindowObserver* observer) = 0; |
| 203 | 197 |
| 204 protected: | 198 protected: |
| 205 virtual ~WmWindow() {} | 199 virtual ~WmWindow() {} |
| 206 }; | 200 }; |
| 207 | 201 |
| 208 } // namespace wm | 202 } // namespace wm |
| 209 } // namespace ash | 203 } // namespace ash |
| 210 | 204 |
| 211 #endif // ASH_WM_COMMON_WM_WINDOW_H_ | 205 #endif // ASH_WM_COMMON_WM_WINDOW_H_ |
| OLD | NEW |