Chromium Code Reviews| 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/accelerators/ash_focus_manager_factory.h" | 10 #include "ash/common/accelerators/ash_focus_manager_factory.h" |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 void WmShell::SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui) { | 348 void WmShell::SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui) { |
| 349 keyboard_ui_ = std::move(keyboard_ui); | 349 keyboard_ui_ = std::move(keyboard_ui); |
| 350 } | 350 } |
| 351 | 351 |
| 352 void WmShell::SetSystemTrayDelegate( | 352 void WmShell::SetSystemTrayDelegate( |
| 353 std::unique_ptr<SystemTrayDelegate> delegate) { | 353 std::unique_ptr<SystemTrayDelegate> delegate) { |
| 354 DCHECK(delegate); | 354 DCHECK(delegate); |
| 355 system_tray_delegate_ = std::move(delegate); | 355 system_tray_delegate_ = std::move(delegate); |
| 356 system_tray_delegate_->Initialize(); | 356 system_tray_delegate_->Initialize(); |
| 357 #if defined(OS_CHROMEOS) | 357 #if defined(OS_CHROMEOS) |
| 358 // Accesses WmShell in its constructor. | |
|
James Cook
2016/11/15 22:43:18
I left this where it is because WmShell is probabl
| |
| 358 logout_confirmation_controller_.reset(new LogoutConfirmationController( | 359 logout_confirmation_controller_.reset(new LogoutConfirmationController( |
| 359 base::Bind(&SystemTrayDelegate::SignOut, | 360 base::Bind(&SystemTrayController::SignOut, |
| 360 base::Unretained(system_tray_delegate_.get())))); | 361 base::Unretained(system_tray_controller_.get())))); |
| 361 #endif | 362 #endif |
| 362 } | 363 } |
| 363 | 364 |
| 364 void WmShell::DeleteSystemTrayDelegate() { | 365 void WmShell::DeleteSystemTrayDelegate() { |
| 365 DCHECK(system_tray_delegate_); | 366 DCHECK(system_tray_delegate_); |
| 366 #if defined(OS_CHROMEOS) | 367 #if defined(OS_CHROMEOS) |
| 368 // Accesses WmShell in its destructor. | |
| 367 logout_confirmation_controller_.reset(); | 369 logout_confirmation_controller_.reset(); |
| 368 #endif | 370 #endif |
| 369 system_tray_delegate_.reset(); | 371 system_tray_delegate_.reset(); |
| 370 } | 372 } |
| 371 | 373 |
| 372 void WmShell::DeleteWindowCycleController() { | 374 void WmShell::DeleteWindowCycleController() { |
| 373 window_cycle_controller_.reset(); | 375 window_cycle_controller_.reset(); |
| 374 } | 376 } |
| 375 | 377 |
| 376 void WmShell::DeleteWindowSelectorController() { | 378 void WmShell::DeleteWindowSelectorController() { |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 396 void WmShell::DeleteToastManager() { | 398 void WmShell::DeleteToastManager() { |
| 397 toast_manager_.reset(); | 399 toast_manager_.reset(); |
| 398 } | 400 } |
| 399 | 401 |
| 400 void WmShell::SetAcceleratorController( | 402 void WmShell::SetAcceleratorController( |
| 401 std::unique_ptr<AcceleratorController> accelerator_controller) { | 403 std::unique_ptr<AcceleratorController> accelerator_controller) { |
| 402 accelerator_controller_ = std::move(accelerator_controller); | 404 accelerator_controller_ = std::move(accelerator_controller); |
| 403 } | 405 } |
| 404 | 406 |
| 405 } // namespace ash | 407 } // namespace ash |
| OLD | NEW |