| 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/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
| 10 #include "ash/common/key_event_watcher.h" | 10 #include "ash/common/key_event_watcher.h" |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 void WmShellMus::RequestShutdown() { | 416 void WmShellMus::RequestShutdown() { |
| 417 NOTIMPLEMENTED(); | 417 NOTIMPLEMENTED(); |
| 418 } | 418 } |
| 419 | 419 |
| 420 bool WmShellMus::IsTouchDown() { | 420 bool WmShellMus::IsTouchDown() { |
| 421 // TODO: implement me, http://crbug.com/634967. | 421 // TODO: implement me, http://crbug.com/634967. |
| 422 // NOTIMPLEMENTED is too spammy here. | 422 // NOTIMPLEMENTED is too spammy here. |
| 423 return false; | 423 return false; |
| 424 } | 424 } |
| 425 | 425 |
| 426 #if defined(OS_CHROMEOS) | |
| 427 void WmShellMus::ToggleIgnoreExternalKeyboard() { | 426 void WmShellMus::ToggleIgnoreExternalKeyboard() { |
| 428 NOTIMPLEMENTED(); | 427 NOTIMPLEMENTED(); |
| 429 } | 428 } |
| 430 | 429 |
| 431 void WmShellMus::SetLaserPointerEnabled(bool enabled) { | 430 void WmShellMus::SetLaserPointerEnabled(bool enabled) { |
| 432 NOTIMPLEMENTED(); | 431 NOTIMPLEMENTED(); |
| 433 } | 432 } |
| 434 #endif // defined(OS_CHROMEOS) | |
| 435 | 433 |
| 436 // TODO: support OnAttemptToReactivateWindow, http://crbug.com/615114. | 434 // TODO: support OnAttemptToReactivateWindow, http://crbug.com/615114. |
| 437 // TODO: Nuke and let client code use ActivationChangeObserver directly. | 435 // TODO: Nuke and let client code use ActivationChangeObserver directly. |
| 438 void WmShellMus::OnWindowActivated(ActivationReason reason, | 436 void WmShellMus::OnWindowActivated(ActivationReason reason, |
| 439 aura::Window* gained_active, | 437 aura::Window* gained_active, |
| 440 aura::Window* lost_active) { | 438 aura::Window* lost_active) { |
| 441 WmWindow* gained_active_wm = WmWindowMus::Get(gained_active); | 439 WmWindow* gained_active_wm = WmWindowMus::Get(gained_active); |
| 442 if (gained_active_wm) | 440 if (gained_active_wm) |
| 443 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); | 441 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); |
| 444 WmWindow* lost_active_wm = WmWindowMus::Get(lost_active); | 442 WmWindow* lost_active_wm = WmWindowMus::Get(lost_active); |
| 445 for (auto& observer : activation_observers_) | 443 for (auto& observer : activation_observers_) |
| 446 observer.OnWindowActivated(gained_active_wm, lost_active_wm); | 444 observer.OnWindowActivated(gained_active_wm, lost_active_wm); |
| 447 } | 445 } |
| 448 | 446 |
| 449 } // namespace mus | 447 } // namespace mus |
| 450 } // namespace ash | 448 } // namespace ash |
| OLD | NEW |