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

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

Issue 2292183003: Moves WorkspaceController to ash/common (Closed)
Patch Set: merge 2 trunk 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); 207 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES);
206 #endif 208 #endif
207 209
208 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, 210 CreateContainer(kShellWindowId_PowerButtonAnimationContainer,
209 "PowerButtonAnimationContainer", root_); 211 "PowerButtonAnimationContainer", root_);
210 } 212 }
211 213
212 void RootWindowControllerCommon::CreateLayoutManagers() { 214 void RootWindowControllerCommon::CreateLayoutManagers() {
213 root_window_layout_ = new wm::RootWindowLayoutManager(root_); 215 root_window_layout_ = new wm::RootWindowLayoutManager(root_);
214 root_->SetLayoutManager(base::WrapUnique(root_window_layout_)); 216 root_->SetLayoutManager(base::WrapUnique(root_window_layout_));
217
218 WmWindow* default_container =
219 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer);
220 workspace_controller_.reset(new WorkspaceController(default_container));
221 }
222
223 void RootWindowControllerCommon::DeleteWorkspaceController() {
224 workspace_controller_.reset();
215 } 225 }
216 226
217 } // namespace ash 227 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698