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_ROOT_WINDOW_CONTROLLER_H_ | 5 #ifndef ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ |
6 #define ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ | 6 #define ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/common/wm/workspace/workspace_types.h" | 9 #include "ash/common/wm/workspace/workspace_types.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Point; | 13 class Point; |
14 } | 14 } |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 | 17 |
18 class AlwaysOnTopController; | 18 class AlwaysOnTopController; |
| 19 class WmShelf; |
19 class WmShell; | 20 class WmShell; |
20 class WmRootWindowControllerObserver; | 21 class WmRootWindowControllerObserver; |
21 class WmWindow; | 22 class WmWindow; |
22 | 23 |
23 namespace wm { | |
24 class WmShelf; | |
25 } | |
26 | |
27 // Provides state associated with a root of a window hierarchy. | 24 // Provides state associated with a root of a window hierarchy. |
28 class ASH_EXPORT WmRootWindowController { | 25 class ASH_EXPORT WmRootWindowController { |
29 public: | 26 public: |
30 virtual ~WmRootWindowController() {} | 27 virtual ~WmRootWindowController() {} |
31 | 28 |
32 virtual bool HasShelf() = 0; | 29 virtual bool HasShelf() = 0; |
33 | 30 |
34 virtual WmShell* GetShell() = 0; | 31 virtual WmShell* GetShell() = 0; |
35 | 32 |
36 virtual wm::WorkspaceWindowState GetWorkspaceWindowState() = 0; | 33 virtual wm::WorkspaceWindowState GetWorkspaceWindowState() = 0; |
37 | 34 |
38 virtual AlwaysOnTopController* GetAlwaysOnTopController() = 0; | 35 virtual AlwaysOnTopController* GetAlwaysOnTopController() = 0; |
39 | 36 |
40 virtual wm::WmShelf* GetShelf() = 0; | 37 virtual WmShelf* GetShelf() = 0; |
41 | 38 |
42 // Returns the window associated with this WmRootWindowController. | 39 // Returns the window associated with this WmRootWindowController. |
43 virtual WmWindow* GetWindow() = 0; | 40 virtual WmWindow* GetWindow() = 0; |
44 | 41 |
45 // Configures |init_params| prior to initializing |widget|. | 42 // Configures |init_params| prior to initializing |widget|. |
46 // |shell_container_id| is the id of the container to parent |widget| to. | 43 // |shell_container_id| is the id of the container to parent |widget| to. |
47 virtual void ConfigureWidgetInitParamsForContainer( | 44 virtual void ConfigureWidgetInitParamsForContainer( |
48 views::Widget* widget, | 45 views::Widget* widget, |
49 int shell_container_id, | 46 int shell_container_id, |
50 views::Widget::InitParams* init_params) = 0; | 47 views::Widget::InitParams* init_params) = 0; |
51 | 48 |
52 // Returns the window events will be targeted at for the specified location | 49 // Returns the window events will be targeted at for the specified location |
53 // (in screen coordinates). | 50 // (in screen coordinates). |
54 // | 51 // |
55 // NOTE: the returned window may not contain the location as resize handles | 52 // NOTE: the returned window may not contain the location as resize handles |
56 // may extend outside the bounds of the window. | 53 // may extend outside the bounds of the window. |
57 virtual WmWindow* FindEventTarget(const gfx::Point& location_in_screen) = 0; | 54 virtual WmWindow* FindEventTarget(const gfx::Point& location_in_screen) = 0; |
58 | 55 |
59 virtual void AddObserver(WmRootWindowControllerObserver* observer) = 0; | 56 virtual void AddObserver(WmRootWindowControllerObserver* observer) = 0; |
60 virtual void RemoveObserver(WmRootWindowControllerObserver* observer) = 0; | 57 virtual void RemoveObserver(WmRootWindowControllerObserver* observer) = 0; |
61 }; | 58 }; |
62 | 59 |
63 } // namespace ash | 60 } // namespace ash |
64 | 61 |
65 #endif // ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ | 62 #endif // ASH_COMMON_WM_ROOT_WINDOW_CONTROLLER_H_ |
OLD | NEW |