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_COMMON_WM_WINDOW_H_ | 5 #ifndef ASH_COMMON_WM_WINDOW_H_ |
6 #define ASH_COMMON_WM_WINDOW_H_ | 6 #define ASH_COMMON_WM_WINDOW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 | 36 |
37 namespace views { | 37 namespace views { |
38 class View; | 38 class View; |
39 class Widget; | 39 class Widget; |
40 } | 40 } |
41 | 41 |
42 namespace ash { | 42 namespace ash { |
43 | 43 |
44 class ImmersiveFullscreenController; | 44 class ImmersiveFullscreenController; |
| 45 class RootWindowController; |
45 class WmLayoutManager; | 46 class WmLayoutManager; |
46 class WmRootWindowController; | |
47 class WmShell; | 47 class WmShell; |
48 class WmTransientWindowObserver; | 48 class WmTransientWindowObserver; |
49 class WmWindowObserver; | 49 class WmWindowObserver; |
50 enum class WmWindowProperty; | 50 enum class WmWindowProperty; |
51 | 51 |
52 namespace wm { | 52 namespace wm { |
53 class WindowState; | 53 class WindowState; |
54 } | 54 } |
55 | 55 |
56 // This class exists as a porting layer to allow ash/wm to work with | 56 // This class exists as a porting layer to allow ash/wm to work with |
57 // aura::Window or ui::Window. See aura::Window for details on the functions. | 57 // aura::Window or ui::Window. See aura::Window for details on the functions. |
58 class ASH_EXPORT WmWindow { | 58 class ASH_EXPORT WmWindow { |
59 public: | 59 public: |
60 // See comments in SetBoundsInScreen(). | 60 // See comments in SetBoundsInScreen(). |
61 enum class BoundsInScreenBehavior { | 61 enum class BoundsInScreenBehavior { |
62 USE_LOCAL_COORDINATES, | 62 USE_LOCAL_COORDINATES, |
63 USE_SCREEN_COORDINATES, | 63 USE_SCREEN_COORDINATES, |
64 }; | 64 }; |
65 | 65 |
66 using Windows = std::vector<WmWindow*>; | 66 using Windows = std::vector<WmWindow*>; |
67 | 67 |
68 virtual void Destroy() = 0; | 68 virtual void Destroy() = 0; |
69 | 69 |
70 WmWindow* GetRootWindow() { | 70 WmWindow* GetRootWindow() { |
71 return const_cast<WmWindow*>( | 71 return const_cast<WmWindow*>( |
72 const_cast<const WmWindow*>(this)->GetRootWindow()); | 72 const_cast<const WmWindow*>(this)->GetRootWindow()); |
73 } | 73 } |
74 virtual const WmWindow* GetRootWindow() const = 0; | 74 virtual const WmWindow* GetRootWindow() const = 0; |
75 virtual WmRootWindowController* GetRootWindowController() = 0; | 75 virtual RootWindowController* GetRootWindowController() = 0; |
76 | 76 |
77 // TODO(sky): fix constness. | 77 // TODO(sky): fix constness. |
78 virtual WmShell* GetShell() const = 0; | 78 virtual WmShell* GetShell() const = 0; |
79 | 79 |
80 // Used for debugging. | 80 // Used for debugging. |
81 virtual void SetName(const char* name) = 0; | 81 virtual void SetName(const char* name) = 0; |
82 virtual std::string GetName() const = 0; | 82 virtual std::string GetName() const = 0; |
83 | 83 |
84 virtual void SetTitle(const base::string16& title) = 0; | 84 virtual void SetTitle(const base::string16& title) = 0; |
85 virtual base::string16 GetTitle() const = 0; | 85 virtual base::string16 GetTitle() const = 0; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0; | 338 virtual void AddLimitedPreTargetHandler(ui::EventHandler* handler) = 0; |
339 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0; | 339 virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0; |
340 | 340 |
341 protected: | 341 protected: |
342 virtual ~WmWindow() {} | 342 virtual ~WmWindow() {} |
343 }; | 343 }; |
344 | 344 |
345 } // namespace ash | 345 } // namespace ash |
346 | 346 |
347 #endif // ASH_COMMON_WM_WINDOW_H_ | 347 #endif // ASH_COMMON_WM_WINDOW_H_ |
OLD | NEW |