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

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

Issue 2741403004: mash: Update LoginStatus with session state updates (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « ash/common/session/session_controller_unittest.cc ('k') | ash/mus/system_tray_delegate_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « ash/common/session/session_controller_unittest.cc ('k') | ash/mus/system_tray_delegate_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698