| 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 "ash/common/default_accessibility_delegate.h" | 7 #include "ash/common/default_accessibility_delegate.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/shell_observer.h" | 9 #include "ash/common/shell_observer.h" |
| 10 #include "ash/common/shell_window_ids.h" | 10 #include "ash/common/shell_window_ids.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 wm_shell_common_.reset(new WmShellCommon); | 98 wm_shell_common_.reset(new WmShellCommon); |
| 99 wm_shell_common_->CreateMruWindowTracker(); | 99 wm_shell_common_->CreateMruWindowTracker(); |
| 100 | 100 |
| 101 accessibility_delegate_.reset(new DefaultAccessibilityDelegate); | 101 accessibility_delegate_.reset(new DefaultAccessibilityDelegate); |
| 102 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); | 102 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); |
| 103 } | 103 } |
| 104 | 104 |
| 105 WmShellMus::~WmShellMus() { | 105 WmShellMus::~WmShellMus() { |
| 106 SetSystemTrayDelegate(nullptr); | 106 SetSystemTrayDelegate(nullptr); |
| 107 DeleteWindowSelectorController(); |
| 107 wm_shell_common_->DeleteMruWindowTracker(); | 108 wm_shell_common_->DeleteMruWindowTracker(); |
| 108 RemoveClientObserver(); | 109 RemoveClientObserver(); |
| 109 WmShell::Set(nullptr); | 110 WmShell::Set(nullptr); |
| 110 } | 111 } |
| 111 | 112 |
| 112 // static | 113 // static |
| 113 WmShellMus* WmShellMus::Get() { | 114 WmShellMus* WmShellMus::Get() { |
| 114 return static_cast<WmShellMus*>(WmShell::Get()); | 115 return static_cast<WmShellMus*>(WmShell::Get()); |
| 115 } | 116 } |
| 116 | 117 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 void WmShellMus::OnOverviewModeStarting() { | 226 void WmShellMus::OnOverviewModeStarting() { |
| 226 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), | 227 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), |
| 227 OnOverviewModeStarting()); | 228 OnOverviewModeStarting()); |
| 228 } | 229 } |
| 229 | 230 |
| 230 void WmShellMus::OnOverviewModeEnded() { | 231 void WmShellMus::OnOverviewModeEnded() { |
| 231 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), | 232 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), |
| 232 OnOverviewModeEnded()); | 233 OnOverviewModeEnded()); |
| 233 } | 234 } |
| 234 | 235 |
| 235 bool WmShellMus::IsOverviewModeSelecting() { | |
| 236 NOTIMPLEMENTED(); | |
| 237 return false; | |
| 238 } | |
| 239 | |
| 240 bool WmShellMus::IsOverviewModeRestoringMinimizedWindows() { | |
| 241 NOTIMPLEMENTED(); | |
| 242 return false; | |
| 243 } | |
| 244 | |
| 245 AccessibilityDelegate* WmShellMus::GetAccessibilityDelegate() { | 236 AccessibilityDelegate* WmShellMus::GetAccessibilityDelegate() { |
| 246 return accessibility_delegate_.get(); | 237 return accessibility_delegate_.get(); |
| 247 } | 238 } |
| 248 | 239 |
| 249 SessionStateDelegate* WmShellMus::GetSessionStateDelegate() { | 240 SessionStateDelegate* WmShellMus::GetSessionStateDelegate() { |
| 250 return session_state_delegate_.get(); | 241 return session_state_delegate_.get(); |
| 251 } | 242 } |
| 252 | 243 |
| 253 void WmShellMus::AddActivationObserver(WmActivationObserver* observer) { | 244 void WmShellMus::AddActivationObserver(WmActivationObserver* observer) { |
| 254 activation_observers_.AddObserver(observer); | 245 activation_observers_.AddObserver(observer); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 OnWindowActivated(gained_active, lost_active)); | 306 OnWindowActivated(gained_active, lost_active)); |
| 316 } | 307 } |
| 317 | 308 |
| 318 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) { | 309 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) { |
| 319 DCHECK_EQ(client, client_); | 310 DCHECK_EQ(client, client_); |
| 320 RemoveClientObserver(); | 311 RemoveClientObserver(); |
| 321 } | 312 } |
| 322 | 313 |
| 323 } // namespace mus | 314 } // namespace mus |
| 324 } // namespace ash | 315 } // namespace ash |
| OLD | NEW |