| 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_shell.h" | 5 #include "ash/common/wm_shell.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
| 10 #include "ash/common/cast_config_controller.h" | 10 #include "ash/common/cast_config_controller.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 void WmShell::SetAcceleratorController( | 296 void WmShell::SetAcceleratorController( |
| 297 std::unique_ptr<AcceleratorController> accelerator_controller) { | 297 std::unique_ptr<AcceleratorController> accelerator_controller) { |
| 298 accelerator_controller_ = std::move(accelerator_controller); | 298 accelerator_controller_ = std::move(accelerator_controller); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void WmShell::SessionStateChanged(session_manager::SessionState state) { | 301 void WmShell::SessionStateChanged(session_manager::SessionState state) { |
| 302 // Create the shelf when a session becomes active. It's safe to do this | 302 // Create the shelf when a session becomes active. It's safe to do this |
| 303 // multiple times (e.g. initial login vs. multiprofile add session). | 303 // multiple times (e.g. initial login vs. multiprofile add session). |
| 304 if (state == session_manager::SessionState::ACTIVE) | 304 if (state == session_manager::SessionState::ACTIVE) |
| 305 CreateShelfView(); | 305 CreateShelfView(); |
| 306 |
| 307 // Only trigger an update in mash because with classic ash chrome calls |
| 308 // UpdateAfterLoginStatusChange() directly. |
| 309 if (IsRunningInMash()) { |
| 310 // TODO(jamescook): Should this call Shell::OnLoginStatusChanged() too? |
| 311 UpdateAfterLoginStatusChange(session_controller_->GetLoginStatus()); |
| 312 } |
| 306 } | 313 } |
| 307 | 314 |
| 308 } // namespace ash | 315 } // namespace ash |
| OLD | NEW |