| 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/wallpaper/wallpaper_delegate.h" | 8 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 9 #include "ash/common/wallpaper/wallpaper_widget_controller.h" | 9 #include "ash/common/wallpaper/wallpaper_widget_controller.h" |
| 10 #include "ash/common/wm/root_window_layout_manager.h" | 10 #include "ash/common/wm/root_window_layout_manager.h" |
| 11 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 11 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
| 12 #include "ash/common/wm/workspace_controller.h" | 12 #include "ash/common/wm/workspace_controller.h" |
| 13 #include "ash/common/wm_shell.h" | 13 #include "ash/common/wm_shell.h" |
| 14 #include "ash/common/wm_window.h" | 14 #include "ash/common/wm_window.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Creates a new window for use as a container. | 20 // Creates a new window for use as a container. |
| 21 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) { | 21 WmWindow* CreateContainer(int window_id, const char* name, WmWindow* parent) { |
| 22 WmWindow* window = WmShell::Get()->NewContainerWindow(); | 22 WmWindow* window = WmShell::Get()->NewWindow(ui::wm::WINDOW_TYPE_UNKNOWN, |
| 23 ui::LAYER_NOT_DRAWN); |
| 23 window->SetShellWindowId(window_id); | 24 window->SetShellWindowId(window_id); |
| 24 window->SetName(name); | 25 window->SetName(name); |
| 25 parent->AddChild(window); | 26 parent->AddChild(window); |
| 26 if (window_id != kShellWindowId_UnparentedControlContainer) | 27 if (window_id != kShellWindowId_UnparentedControlContainer) |
| 27 window->Show(); | 28 window->Show(); |
| 28 return window; | 29 return window; |
| 29 } | 30 } |
| 30 | 31 |
| 31 } // namespace | 32 } // namespace |
| 32 | 33 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 WmWindow* default_container = | 258 WmWindow* default_container = |
| 258 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer); | 259 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer); |
| 259 workspace_controller_.reset(new WorkspaceController(default_container)); | 260 workspace_controller_.reset(new WorkspaceController(default_container)); |
| 260 } | 261 } |
| 261 | 262 |
| 262 void WmRootWindowController::DeleteWorkspaceController() { | 263 void WmRootWindowController::DeleteWorkspaceController() { |
| 263 workspace_controller_.reset(); | 264 workspace_controller_.reset(); |
| 264 } | 265 } |
| 265 | 266 |
| 266 } // namespace ash | 267 } // namespace ash |
| OLD | NEW |