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 "ash/common/focus_cycler.h" | 7 #include "ash/common/focus_cycler.h" |
8 #include "ash/common/keyboard/keyboard_ui.h" | 8 #include "ash/common/keyboard/keyboard_ui.h" |
9 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
10 #include "ash/common/system/chromeos/session/logout_confirmation_controller.h" | 10 #include "ash/common/system/chromeos/session/logout_confirmation_controller.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 } | 55 } |
56 } | 56 } |
57 return false; | 57 return false; |
58 } | 58 } |
59 | 59 |
60 void WmShell::SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui) { | 60 void WmShell::SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui) { |
61 keyboard_ui_ = std::move(keyboard_ui); | 61 keyboard_ui_ = std::move(keyboard_ui); |
62 } | 62 } |
63 | 63 |
| 64 void WmShell::SetMediaDelegate(std::unique_ptr<MediaDelegate> delegate) { |
| 65 media_delegate_ = std::move(delegate); |
| 66 } |
| 67 |
64 void WmShell::SetSystemTrayDelegate( | 68 void WmShell::SetSystemTrayDelegate( |
65 std::unique_ptr<SystemTrayDelegate> delegate) { | 69 std::unique_ptr<SystemTrayDelegate> delegate) { |
66 DCHECK(delegate); | 70 DCHECK(delegate); |
67 DCHECK(!system_tray_delegate_); | 71 DCHECK(!system_tray_delegate_); |
68 // TODO(jamescook): Create via ShellDelegate once it moves to //ash/common. | 72 // TODO(jamescook): Create via ShellDelegate once it moves to //ash/common. |
69 system_tray_delegate_ = std::move(delegate); | 73 system_tray_delegate_ = std::move(delegate); |
70 system_tray_delegate_->Initialize(); | 74 system_tray_delegate_->Initialize(); |
71 #if defined(OS_CHROMEOS) | 75 #if defined(OS_CHROMEOS) |
72 logout_confirmation_controller_.reset(new LogoutConfirmationController( | 76 logout_confirmation_controller_.reset(new LogoutConfirmationController( |
73 base::Bind(&SystemTrayDelegate::SignOut, | 77 base::Bind(&SystemTrayDelegate::SignOut, |
74 base::Unretained(system_tray_delegate_.get())))); | 78 base::Unretained(system_tray_delegate_.get())))); |
75 #endif | 79 #endif |
76 } | 80 } |
77 | 81 |
78 void WmShell::DeleteSystemTrayDelegate() { | 82 void WmShell::DeleteSystemTrayDelegate() { |
79 DCHECK(system_tray_delegate_); | 83 DCHECK(system_tray_delegate_); |
80 #if defined(OS_CHROMEOS) | 84 #if defined(OS_CHROMEOS) |
81 logout_confirmation_controller_.reset(); | 85 logout_confirmation_controller_.reset(); |
82 #endif | 86 #endif |
83 system_tray_delegate_.reset(); | 87 system_tray_delegate_.reset(); |
84 } | 88 } |
85 | 89 |
86 void WmShell::DeleteWindowSelectorController() { | 90 void WmShell::DeleteWindowSelectorController() { |
87 window_selector_controller_.reset(); | 91 window_selector_controller_.reset(); |
88 } | 92 } |
89 | 93 |
90 } // namespace ash | 94 } // namespace ash |
OLD | NEW |