| OLD | NEW |
| 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/wm_root_window_controller.h" | 5 #include "ash/common/wm_root_window_controller.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" | 9 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
| 10 #include "ash/common/wm/workspace_controller.h" | 10 #include "ash/common/wm/workspace_controller.h" |
| 11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
| 12 #include "ash/common/wm_window.h" | 12 #include "ash/common/wm_window.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // Creates a new window for use as a container. | 18 // Creates a new window for use as a container. |
| 19 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) { | 19 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) { |
| 20 WmWindow* window = WmShell::Get()->NewContainerWindow(); | 20 WmWindow* window = WmShell::Get()->NewWindow(ui::wm::WINDOW_TYPE_UNKNOWN, |
| 21 ui::LAYER_NOT_DRAWN); |
| 21 window->SetShellWindowId(window_id); | 22 window->SetShellWindowId(window_id); |
| 22 window->SetName(name); | 23 window->SetName(name); |
| 23 parent->AddChild(window); | 24 parent->AddChild(window); |
| 24 if (window_id != kShellWindowId_UnparentedControlContainer) | 25 if (window_id != kShellWindowId_UnparentedControlContainer) |
| 25 window->Show(); | 26 window->Show(); |
| 26 return window; | 27 return window; |
| 27 } | 28 } |
| 28 | 29 |
| 29 } // namespace | 30 } // namespace |
| 30 | 31 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 WmWindow* default_container = | 224 WmWindow* default_container = |
| 224 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer); | 225 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer); |
| 225 workspace_controller_.reset(new WorkspaceController(default_container)); | 226 workspace_controller_.reset(new WorkspaceController(default_container)); |
| 226 } | 227 } |
| 227 | 228 |
| 228 void WmRootWindowController::DeleteWorkspaceController() { | 229 void WmRootWindowController::DeleteWorkspaceController() { |
| 229 workspace_controller_.reset(); | 230 workspace_controller_.reset(); |
| 230 } | 231 } |
| 231 | 232 |
| 232 } // namespace ash | 233 } // namespace ash |
| OLD | NEW |