Index: ash/root_window_controller.cc |
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
index 85122bd83b767048501dbb949221c1aa1603f852..90395328c7511c635f6afb75e2ab6cf9f98ac01d 100644 |
--- a/ash/root_window_controller.cc |
+++ b/ash/root_window_controller.cc |
@@ -36,6 +36,7 @@ |
#include "ash/common/wm/switchable_windows.h" |
#include "ash/common/wm/window_state.h" |
#include "ash/common/wm/workspace/workspace_layout_manager.h" |
+#include "ash/common/wm/workspace_controller.h" |
#include "ash/common/wm_shell.h" |
#include "ash/common/wm_window.h" |
#include "ash/desktop_background/desktop_background_widget_controller.h" |
@@ -57,7 +58,6 @@ |
#include "ash/wm/window_properties.h" |
#include "ash/wm/window_state_aura.h" |
#include "ash/wm/window_util.h" |
-#include "ash/wm/workspace_controller.h" |
#include "base/command_line.h" |
#include "base/macros.h" |
#include "base/memory/ptr_util.h" |
@@ -331,6 +331,10 @@ const aura::Window* RootWindowController::GetRootWindow() const { |
return GetHost()->window(); |
} |
+WorkspaceController* RootWindowController::workspace_controller() { |
+ return root_window_controller_common_->workspace_controller(); |
+} |
+ |
void RootWindowController::SetWallpaperController( |
DesktopBackgroundWidgetController* controller) { |
wallpaper_controller_.reset(controller); |
@@ -373,7 +377,6 @@ void RootWindowController::Shutdown() { |
CloseChildWindows(); |
GetRootWindowSettings(root_window)->controller = NULL; |
- workspace_controller_.reset(); |
msw
2016/08/30 17:46:20
nice (called in CloseChildWindows)
|
// Forget with the display ID so that display lookup |
// ends up with invalid display. |
GetRootWindowSettings(root_window)->display_id = |
@@ -577,7 +580,7 @@ void RootWindowController::CloseChildWindows() { |
wallpaper_controller_.reset(); |
animating_wallpaper_controller_.reset(); |
- workspace_controller_.reset(); |
+ root_window_controller_common_->DeleteWorkspaceController(); |
aura::client::SetTooltipClient(root_window, NULL); |
// Explicitly destroy top level windows. We do this as during part of |
@@ -621,7 +624,7 @@ void RootWindowController::CloseChildWindows() { |
void RootWindowController::MoveWindowsTo(aura::Window* dst) { |
// Clear the workspace controller, so it doesn't incorrectly update the shelf. |
- workspace_controller_.reset(); |
+ root_window_controller_common_->DeleteWorkspaceController(); |
ReparentAllWindows(GetRootWindow(), dst); |
} |
@@ -681,7 +684,7 @@ void RootWindowController::ActivateKeyboard( |
keyboard_controller->AddObserver(shelf_widget()->shelf_layout_manager()); |
keyboard_controller->AddObserver(panel_layout_manager_); |
keyboard_controller->AddObserver(docked_layout_manager_); |
- keyboard_controller->AddObserver(workspace_controller_->layout_manager()); |
+ keyboard_controller->AddObserver(workspace_controller()->layout_manager()); |
keyboard_controller->AddObserver( |
always_on_top_controller_->GetLayoutManager()); |
WmShell::Get()->NotifyVirtualKeyboardActivated(true); |
@@ -711,7 +714,7 @@ void RootWindowController::DeactivateKeyboard( |
keyboard_controller->RemoveObserver(panel_layout_manager_); |
keyboard_controller->RemoveObserver(docked_layout_manager_); |
keyboard_controller->RemoveObserver( |
- workspace_controller_->layout_manager()); |
+ workspace_controller()->layout_manager()); |
keyboard_controller->RemoveObserver( |
always_on_top_controller_->GetLayoutManager()); |
WmShell::Get()->NotifyVirtualKeyboardActivated(false); |
@@ -816,10 +819,6 @@ void RootWindowController::InitLayoutManagers() { |
lock_modal_container->SetLayoutManager( |
new SystemModalContainerLayoutManager(lock_modal_container)); |
- WmWindow* default_container = |
- WmWindowAura::Get(GetContainer(kShellWindowId_DefaultContainer)); |
- workspace_controller_.reset(new WorkspaceController(default_container)); |
- |
WmWindow* always_on_top_container = |
WmWindowAura::Get(GetContainer(kShellWindowId_AlwaysOnTopContainer)); |
always_on_top_controller_.reset( |