Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Side by Side Diff: ash/common/root_window_controller_common.cc

Issue 2292183003: Moves WorkspaceController to ash/common (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "ash/common/root_window_controller_common.h" 5 #include "ash/common/root_window_controller_common.h"
6 6
7 #include "ash/common/shell_window_ids.h" 7 #include "ash/common/shell_window_ids.h"
8 #include "ash/common/wm/root_window_layout_manager.h" 8 #include "ash/common/wm/root_window_layout_manager.h"
9 #include "ash/common/wm/workspace/workspace_layout_manager.h"
10 #include "ash/common/wm/workspace_controller.h"
9 #include "ash/common/wm_shell.h" 11 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 12 #include "ash/common/wm_window.h"
11 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
12 14
13 namespace ash { 15 namespace ash {
14 namespace { 16 namespace {
15 17
16 // Creates a new window for use as a container. 18 // Creates a new window for use as a container.
17 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) { 19 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) {
18 WmWindow* window = WmShell::Get()->NewContainerWindow(); 20 WmWindow* window = WmShell::Get()->NewContainerWindow();
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); 209 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
208 #endif 210 #endif
209 211
210 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, 212 CreateContainer(kShellWindowId_PowerButtonAnimationContainer,
211 "PowerButtonAnimationContainer", root_); 213 "PowerButtonAnimationContainer", root_);
212 } 214 }
213 215
214 void RootWindowControllerCommon::CreateLayoutManagers() { 216 void RootWindowControllerCommon::CreateLayoutManagers() {
215 root_window_layout_ = new wm::RootWindowLayoutManager(root_); 217 root_window_layout_ = new wm::RootWindowLayoutManager(root_);
216 root_->SetLayoutManager(base::WrapUnique(root_window_layout_)); 218 root_->SetLayoutManager(base::WrapUnique(root_window_layout_));
219
220 WmWindow* default_container =
221 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer);
222 workspace_controller_.reset(new WorkspaceController(default_container));
223 }
224
225 void RootWindowControllerCommon::DeleteWorkspaceController() {
226 workspace_controller_.reset();
217 } 227 }
218 228
219 } // namespace ash 229 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698