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

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

Issue 2752593008: Move AcceleratorController from WmShell to Shell (Closed)
Patch Set: cleanup 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
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 259 }
260 260
261 void WmShell::CreateMruWindowTracker() { 261 void WmShell::CreateMruWindowTracker() {
262 mru_window_tracker_.reset(new MruWindowTracker); 262 mru_window_tracker_.reset(new MruWindowTracker);
263 } 263 }
264 264
265 void WmShell::DeleteMruWindowTracker() { 265 void WmShell::DeleteMruWindowTracker() {
266 mru_window_tracker_.reset(); 266 mru_window_tracker_.reset();
267 } 267 }
268 268
269 void WmShell::SetAcceleratorController(
270 std::unique_ptr<AcceleratorController> accelerator_controller) {
271 accelerator_controller_ = std::move(accelerator_controller);
272 }
273
274 void WmShell::SessionStateChanged(session_manager::SessionState state) { 269 void WmShell::SessionStateChanged(session_manager::SessionState state) {
275 // Create the shelf when a session becomes active. It's safe to do this 270 // Create the shelf when a session becomes active. It's safe to do this
276 // multiple times (e.g. initial login vs. multiprofile add session). 271 // multiple times (e.g. initial login vs. multiprofile add session).
277 if (state == session_manager::SessionState::ACTIVE) 272 if (state == session_manager::SessionState::ACTIVE)
278 CreateShelfView(); 273 CreateShelfView();
279 274
280 // Only trigger an update in mash because with classic ash chrome calls 275 // Only trigger an update in mash because with classic ash chrome calls
281 // UpdateAfterLoginStatusChange() directly. 276 // UpdateAfterLoginStatusChange() directly.
282 if (IsRunningInMash()) { 277 if (IsRunningInMash()) {
283 // TODO(jamescook): Should this call Shell::OnLoginStatusChanged() too? 278 // TODO(jamescook): Should this call Shell::OnLoginStatusChanged() too?
284 UpdateAfterLoginStatusChange(session_controller_->GetLoginStatus()); 279 UpdateAfterLoginStatusChange(session_controller_->GetLoginStatus());
285 } 280 }
286 } 281 }
287 282
288 } // namespace ash 283 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698