| 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_ROOT_CONTROLLER_H_ | 5 #ifndef ASH_WM_COMMON_WM_ROOT_CONTROLLER_H_ |
| 6 #define ASH_WM_COMMON_WM_ROOT_CONTROLLER_H_ | 6 #define ASH_WM_COMMON_WM_ROOT_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/wm/common/workspace/workspace_types.h" | 11 #include "ash/wm/common/workspace/workspace_types.h" |
| 12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 namespace wm { | 15 namespace wm { |
| 16 | 16 |
| 17 class WmGlobals; | 17 class WmGlobals; |
| 18 class WmRootWindowControllerObserver; |
| 18 class WmWindow; | 19 class WmWindow; |
| 19 | 20 |
| 20 // Provides state associated with a root of a window hierarchy. | 21 // Provides state associated with a root of a window hierarchy. |
| 21 class ASH_EXPORT WmRootWindowController { | 22 class ASH_EXPORT WmRootWindowController { |
| 22 public: | 23 public: |
| 23 virtual ~WmRootWindowController() {} | 24 virtual ~WmRootWindowController() {} |
| 24 | 25 |
| 25 static WmRootWindowController* GetWithDisplayId(int64_t id); | 26 static WmRootWindowController* GetWithDisplayId(int64_t id); |
| 26 | 27 |
| 27 virtual bool HasShelf() = 0; | 28 virtual bool HasShelf() = 0; |
| 28 | 29 |
| 29 virtual WmGlobals* GetGlobals() = 0; | 30 virtual WmGlobals* GetGlobals() = 0; |
| 30 | 31 |
| 31 virtual WorkspaceWindowState GetWorkspaceWindowState() = 0; | 32 virtual WorkspaceWindowState GetWorkspaceWindowState() = 0; |
| 32 | 33 |
| 33 // Returns the window associated with this WmRootWindowController. | 34 // Returns the window associated with this WmRootWindowController. |
| 34 virtual WmWindow* GetWindow() = 0; | 35 virtual WmWindow* GetWindow() = 0; |
| 35 | 36 |
| 36 // Configures |init_params| prior to initializing |widget|. | 37 // Configures |init_params| prior to initializing |widget|. |
| 37 // |shell_container_id| is the id of the container to parent |widget| to. | 38 // |shell_container_id| is the id of the container to parent |widget| to. |
| 38 virtual void ConfigureWidgetInitParamsForContainer( | 39 virtual void ConfigureWidgetInitParamsForContainer( |
| 39 views::Widget* widget, | 40 views::Widget* widget, |
| 40 int shell_container_id, | 41 int shell_container_id, |
| 41 views::Widget::InitParams* init_params) = 0; | 42 views::Widget::InitParams* init_params) = 0; |
| 43 |
| 44 virtual void AddObserver(WmRootWindowControllerObserver* observer) = 0; |
| 45 virtual void RemoveObserver(WmRootWindowControllerObserver* observer) = 0; |
| 42 }; | 46 }; |
| 43 | 47 |
| 44 } // namespace wm | 48 } // namespace wm |
| 45 } // namespace ash | 49 } // namespace ash |
| 46 | 50 |
| 47 #endif // ASH_WM_COMMON_WM_ROOT_CONTROLLER_H_ | 51 #endif // ASH_WM_COMMON_WM_ROOT_CONTROLLER_H_ |
| OLD | NEW |