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 "ash/common/focus_cycler.h" | 7 #include "ash/common/focus_cycler.h" |
| 8 #include "ash/common/keyboard/keyboard_ui.h" | |
|
msw
2016/06/29 01:13:47
nit: not needed (forward decl in header should suf
James Cook
2016/06/29 05:22:16
It's needed to run the std::unique_ptr<KeyboardUI>
| |
| 8 #include "ash/common/shell_window_ids.h" | 9 #include "ash/common/shell_window_ids.h" |
| 9 #include "ash/common/system/tray/system_tray_delegate.h" | 10 #include "ash/common/system/tray/system_tray_delegate.h" |
| 10 #include "ash/common/system/tray/system_tray_notifier.h" | 11 #include "ash/common/system/tray/system_tray_notifier.h" |
| 11 #include "ash/common/wm/overview/window_selector_controller.h" | 12 #include "ash/common/wm/overview/window_selector_controller.h" |
| 12 #include "ash/common/wm_window.h" | 13 #include "ash/common/wm_window.h" |
| 13 #include "base/logging.h" | 14 #include "base/logging.h" |
| 14 | 15 |
| 15 namespace ash { | 16 namespace ash { |
| 16 | 17 |
| 17 // static | 18 // static |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 47 continue; | 48 continue; |
| 48 for (const WmWindow* child : system_modal->GetChildren()) { | 49 for (const WmWindow* child : system_modal->GetChildren()) { |
| 49 if (child->IsSystemModal() && child->GetTargetVisibility()) { | 50 if (child->IsSystemModal() && child->GetTargetVisibility()) { |
| 50 return true; | 51 return true; |
| 51 } | 52 } |
| 52 } | 53 } |
| 53 } | 54 } |
| 54 return false; | 55 return false; |
| 55 } | 56 } |
| 56 | 57 |
| 58 void WmShell::SetKeyboardUI(std::unique_ptr<KeyboardUI> keyboard_ui) { | |
| 59 keyboard_ui_ = std::move(keyboard_ui); | |
| 60 } | |
| 61 | |
| 57 void WmShell::SetSystemTrayDelegate( | 62 void WmShell::SetSystemTrayDelegate( |
| 58 std::unique_ptr<SystemTrayDelegate> delegate) { | 63 std::unique_ptr<SystemTrayDelegate> delegate) { |
| 59 if (delegate) { | 64 if (delegate) { |
| 60 DCHECK(!system_tray_delegate_); | 65 DCHECK(!system_tray_delegate_); |
| 61 // TODO(jamescook): Create via ShellDelegate once it moves to //ash/common. | 66 // TODO(jamescook): Create via ShellDelegate once it moves to //ash/common. |
| 62 system_tray_delegate_ = std::move(delegate); | 67 system_tray_delegate_ = std::move(delegate); |
| 63 system_tray_delegate_->Initialize(); | 68 system_tray_delegate_->Initialize(); |
| 64 } else { | 69 } else { |
| 65 DCHECK(system_tray_delegate_); | 70 DCHECK(system_tray_delegate_); |
| 66 system_tray_delegate_->Shutdown(); | 71 system_tray_delegate_->Shutdown(); |
| 67 system_tray_delegate_.reset(); | 72 system_tray_delegate_.reset(); |
| 68 } | 73 } |
| 69 } | 74 } |
| 70 | 75 |
| 71 void WmShell::DeleteWindowSelectorController() { | 76 void WmShell::DeleteWindowSelectorController() { |
| 72 window_selector_controller_.reset(); | 77 window_selector_controller_.reset(); |
| 73 } | 78 } |
| 74 | 79 |
| 75 } // namespace ash | 80 } // namespace ash |
| OLD | NEW |