| Index: ash/common/wm_root_window_controller.h
|
| diff --git a/ash/common/wm_root_window_controller.h b/ash/common/wm_root_window_controller.h
|
| index ab44458a8b20b200e6f8c788d81ebf7b0bc75ea6..958fd6ae6cf2ee030cd1bc950b09b995f397b0a2 100644
|
| --- a/ash/common/wm_root_window_controller.h
|
| +++ b/ash/common/wm_root_window_controller.h
|
| @@ -28,6 +28,8 @@ namespace ash {
|
|
|
| class AlwaysOnTopController;
|
| class AnimatingWallpaperWidgetController;
|
| +class DockedWindowLayoutManager;
|
| +class PanelLayoutManager;
|
| class SystemModalContainerLayoutManager;
|
| class WallpaperWidgetController;
|
| class WmShelf;
|
| @@ -45,6 +47,12 @@ class ASH_EXPORT WmRootWindowController {
|
| explicit WmRootWindowController(WmWindow* window);
|
| virtual ~WmRootWindowController();
|
|
|
| + DockedWindowLayoutManager* docked_window_layout_manager() {
|
| + return docked_window_layout_manager_;
|
| + }
|
| +
|
| + PanelLayoutManager* panel_layout_manager() { return panel_layout_manager_; }
|
| +
|
| wm::RootWindowLayoutManager* root_window_layout_manager() {
|
| return root_window_layout_manager_;
|
| }
|
| @@ -64,6 +72,10 @@ class ASH_EXPORT WmRootWindowController {
|
| return workspace_controller_.get();
|
| }
|
|
|
| + AlwaysOnTopController* always_on_top_controller() {
|
| + return always_on_top_controller_.get();
|
| + }
|
| +
|
| wm::WorkspaceWindowState GetWorkspaceWindowState();
|
|
|
| // Returns the layout manager for the appropriate modal-container. If the
|
| @@ -80,8 +92,6 @@ class ASH_EXPORT WmRootWindowController {
|
|
|
| virtual WmShell* GetShell() = 0;
|
|
|
| - virtual AlwaysOnTopController* GetAlwaysOnTopController() = 0;
|
| -
|
| virtual WmShelf* GetShelf() = 0;
|
|
|
| // Returns the window associated with this WmRootWindowController.
|
| @@ -128,7 +138,17 @@ class ASH_EXPORT WmRootWindowController {
|
| // Creates the LayoutManagers for the windows created by CreateContainers().
|
| void CreateLayoutManagers();
|
|
|
| - void DeleteWorkspaceController();
|
| + // Resets WmShell::GetRootWindowForNewWindows() if appropriate. This is called
|
| + // during shutdown to make sure GetRootWindowForNewWindows() isn't referencing
|
| + // this.
|
| + void ResetRootForNewWindowsIfNecessary();
|
| +
|
| + // Called during shutdown to destroy state such as windows and LayoutManagers.
|
| + void CloseChildWindows();
|
| +
|
| + // Called from CloseChildWindows() to determine if the specified window should
|
| + // be destroyed.
|
| + virtual bool ShouldDestroyWindowInCloseChildWindows(WmWindow* window) = 0;
|
|
|
| private:
|
| // Callback for MenuModelAdapter.
|
| @@ -136,13 +156,18 @@ class ASH_EXPORT WmRootWindowController {
|
|
|
| WmWindow* root_;
|
|
|
| - wm::RootWindowLayoutManager* root_window_layout_manager_;
|
| + // LayoutManagers are owned by the window they are installed on.
|
| + DockedWindowLayoutManager* docked_window_layout_manager_ = nullptr;
|
| + PanelLayoutManager* panel_layout_manager_ = nullptr;
|
| + wm::RootWindowLayoutManager* root_window_layout_manager_ = nullptr;
|
|
|
| std::unique_ptr<WallpaperWidgetController> wallpaper_widget_controller_;
|
| std::unique_ptr<AnimatingWallpaperWidgetController>
|
| animating_wallpaper_widget_controller_;
|
| std::unique_ptr<WorkspaceController> workspace_controller_;
|
|
|
| + std::unique_ptr<AlwaysOnTopController> always_on_top_controller_;
|
| +
|
| // Manages the context menu.
|
| std::unique_ptr<ui::MenuModel> menu_model_;
|
| std::unique_ptr<views::MenuModelAdapter> menu_model_adapter_;
|
|
|