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..dd853e42dc043f5a00ebf1d633dae6d87f16e683 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_; |
} |
@@ -80,7 +88,9 @@ class ASH_EXPORT WmRootWindowController { |
virtual WmShell* GetShell() = 0; |
- virtual AlwaysOnTopController* GetAlwaysOnTopController() = 0; |
+ AlwaysOnTopController* always_on_top_controller() { |
James Cook
2016/09/21 22:03:18
nit: move this up with other inline getters
sky
2016/09/21 22:47:48
Done.
|
+ return always_on_top_controller_.get(); |
+ } |
virtual WmShelf* GetShelf() = 0; |
@@ -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. |
James Cook
2016/09/21 22:03:18
+1 for helpful ownership comment
|
+ 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_; |