| 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" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 WmRootWindowController::WmRootWindowController(WmWindow* root) | 31 WmRootWindowController::WmRootWindowController(WmWindow* root) |
| 32 : root_(root), root_window_layout_manager_(nullptr) {} | 32 : root_(root), root_window_layout_manager_(nullptr) {} |
| 33 | 33 |
| 34 WmRootWindowController::~WmRootWindowController() {} | 34 WmRootWindowController::~WmRootWindowController() {} |
| 35 | 35 |
| 36 wm::WorkspaceWindowState WmRootWindowController::GetWorkspaceWindowState() { | 36 wm::WorkspaceWindowState WmRootWindowController::GetWorkspaceWindowState() { |
| 37 return workspace_controller_ ? workspace_controller()->GetWindowState() | 37 return workspace_controller_ ? workspace_controller()->GetWindowState() |
| 38 : wm::WORKSPACE_WINDOW_STATE_DEFAULT; | 38 : wm::WORKSPACE_WINDOW_STATE_DEFAULT; |
| 39 } | 39 } |
| 40 | 40 |
| 41 void WmRootWindowController::AddObserver( | |
| 42 WmRootWindowControllerObserver* observer) { | |
| 43 observers_.AddObserver(observer); | |
| 44 } | |
| 45 | |
| 46 void WmRootWindowController::RemoveObserver( | |
| 47 WmRootWindowControllerObserver* observer) { | |
| 48 observers_.RemoveObserver(observer); | |
| 49 } | |
| 50 | |
| 51 void WmRootWindowController::CreateContainers() { | 41 void WmRootWindowController::CreateContainers() { |
| 52 // These containers are just used by PowerButtonController to animate groups | 42 // These containers are just used by PowerButtonController to animate groups |
| 53 // of containers simultaneously without messing up the current transformations | 43 // of containers simultaneously without messing up the current transformations |
| 54 // on those containers. These are direct children of the root window; all of | 44 // on those containers. These are direct children of the root window; all of |
| 55 // the other containers are their children. | 45 // the other containers are their children. |
| 56 | 46 |
| 57 // The wallpaper container is not part of the lock animation, so it is not | 47 // The wallpaper container is not part of the lock animation, so it is not |
| 58 // included in those animate groups. When the screen is locked, the wallpaper | 48 // included in those animate groups. When the screen is locked, the wallpaper |
| 59 // is moved to the lock screen wallpaper container (and moved back on unlock). | 49 // is moved to the lock screen wallpaper container (and moved back on unlock). |
| 60 // Ensure that there's an opaque layer occluding the non-lock-screen layers. | 50 // Ensure that there's an opaque layer occluding the non-lock-screen layers. |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 WmWindow* default_container = | 223 WmWindow* default_container = |
| 234 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer); | 224 root_->GetChildByShellWindowId(kShellWindowId_DefaultContainer); |
| 235 workspace_controller_.reset(new WorkspaceController(default_container)); | 225 workspace_controller_.reset(new WorkspaceController(default_container)); |
| 236 } | 226 } |
| 237 | 227 |
| 238 void WmRootWindowController::DeleteWorkspaceController() { | 228 void WmRootWindowController::DeleteWorkspaceController() { |
| 239 workspace_controller_.reset(); | 229 workspace_controller_.reset(); |
| 240 } | 230 } |
| 241 | 231 |
| 242 } // namespace ash | 232 } // namespace ash |
| OLD | NEW |