| 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/mus/bridge/wm_shell_mus.h" | 5 #include "ash/mus/bridge/wm_shell_mus.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/display/display_info.h" | 9 #include "ash/common/display/display_info.h" |
| 10 #include "ash/common/keyboard/keyboard_ui.h" | 10 #include "ash/common/keyboard/keyboard_ui.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 : WmShell(std::move(shell_delegate)), | 101 : WmShell(std::move(shell_delegate)), |
| 102 client_(client), | 102 client_(client), |
| 103 session_state_delegate_(new SessionStateDelegateStub) { | 103 session_state_delegate_(new SessionStateDelegateStub) { |
| 104 client_->AddObserver(this); | 104 client_->AddObserver(this); |
| 105 WmShell::Set(this); | 105 WmShell::Set(this); |
| 106 | 106 |
| 107 CreateMaximizeModeController(); | 107 CreateMaximizeModeController(); |
| 108 | 108 |
| 109 CreateMruWindowTracker(); | 109 CreateMruWindowTracker(); |
| 110 | 110 |
| 111 CreateWindowCycleController(); |
| 112 |
| 111 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); | 113 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); |
| 112 | 114 |
| 113 // TODO(jamescook): Port ash::sysui::KeyboardUIMus and use it here. | 115 // TODO(jamescook): Port ash::sysui::KeyboardUIMus and use it here. |
| 114 SetKeyboardUI(KeyboardUI::Create()); | 116 SetKeyboardUI(KeyboardUI::Create()); |
| 115 } | 117 } |
| 116 | 118 |
| 117 WmShellMus::~WmShellMus() { | 119 WmShellMus::~WmShellMus() { |
| 118 // This order mirrors that of Shell. | 120 // This order mirrors that of Shell. |
| 119 | 121 |
| 120 // Destroy maximize mode controller early on since it has some observers which | 122 // Destroy maximize mode controller early on since it has some observers which |
| 121 // need to be removed. | 123 // need to be removed. |
| 122 DeleteMaximizeModeController(); | 124 DeleteMaximizeModeController(); |
| 123 DeleteSystemTrayDelegate(); | 125 DeleteSystemTrayDelegate(); |
| 126 DeleteWindowCycleController(); |
| 124 DeleteWindowSelectorController(); | 127 DeleteWindowSelectorController(); |
| 125 DeleteMruWindowTracker(); | 128 DeleteMruWindowTracker(); |
| 126 RemoveClientObserver(); | 129 RemoveClientObserver(); |
| 127 WmShell::Set(nullptr); | 130 WmShell::Set(nullptr); |
| 128 } | 131 } |
| 129 | 132 |
| 130 // static | 133 // static |
| 131 WmShellMus* WmShellMus::Get() { | 134 WmShellMus* WmShellMus::Get() { |
| 132 return static_cast<WmShellMus*>(WmShell::Get()); | 135 return static_cast<WmShellMus*>(WmShell::Get()); |
| 133 } | 136 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 OnWindowActivated(gained_active, lost_active)); | 348 OnWindowActivated(gained_active, lost_active)); |
| 346 } | 349 } |
| 347 | 350 |
| 348 void WmShellMus::OnDidDestroyClient(::ui::WindowTreeClient* client) { | 351 void WmShellMus::OnDidDestroyClient(::ui::WindowTreeClient* client) { |
| 349 DCHECK_EQ(client, client_); | 352 DCHECK_EQ(client, client_); |
| 350 RemoveClientObserver(); | 353 RemoveClientObserver(); |
| 351 } | 354 } |
| 352 | 355 |
| 353 } // namespace mus | 356 } // namespace mus |
| 354 } // namespace ash | 357 } // namespace ash |
| OLD | NEW |