| 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/aura/wm_shell_aura.h" | 5 #include "ash/aura/wm_shell_aura.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.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/wm/mru_window_tracker.h" | 10 #include "ash/common/wm/mru_window_tracker.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 } | 181 } |
| 182 | 182 |
| 183 void WmShellAura::AddShellObserver(ShellObserver* observer) { | 183 void WmShellAura::AddShellObserver(ShellObserver* observer) { |
| 184 wm_shell_common_->AddShellObserver(observer); | 184 wm_shell_common_->AddShellObserver(observer); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void WmShellAura::RemoveShellObserver(ShellObserver* observer) { | 187 void WmShellAura::RemoveShellObserver(ShellObserver* observer) { |
| 188 wm_shell_common_->RemoveShellObserver(observer); | 188 wm_shell_common_->RemoveShellObserver(observer); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher) { |
| 192 Shell::GetInstance()->AddPointerWatcher(watcher); |
| 193 } |
| 194 |
| 195 void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) { |
| 196 Shell::GetInstance()->RemovePointerWatcher(watcher); |
| 197 } |
| 198 |
| 199 #if defined(OS_CHROMEOS) |
| 200 void WmShellAura::ToggleIgnoreExternalKeyboard() { |
| 201 Shell::GetInstance() |
| 202 ->virtual_keyboard_controller() |
| 203 ->ToggleIgnoreExternalKeyboard(); |
| 204 } |
| 205 #endif |
| 206 |
| 191 void WmShellAura::OnWindowActivated( | 207 void WmShellAura::OnWindowActivated( |
| 192 aura::client::ActivationChangeObserver::ActivationReason reason, | 208 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 193 aura::Window* gained_active, | 209 aura::Window* gained_active, |
| 194 aura::Window* lost_active) { | 210 aura::Window* lost_active) { |
| 195 FOR_EACH_OBSERVER(WmActivationObserver, activation_observers_, | 211 FOR_EACH_OBSERVER(WmActivationObserver, activation_observers_, |
| 196 OnWindowActivated(WmWindowAura::Get(gained_active), | 212 OnWindowActivated(WmWindowAura::Get(gained_active), |
| 197 WmWindowAura::Get(lost_active))); | 213 WmWindowAura::Get(lost_active))); |
| 198 } | 214 } |
| 199 | 215 |
| 200 void WmShellAura::OnAttemptToReactivateWindow(aura::Window* request_active, | 216 void WmShellAura::OnAttemptToReactivateWindow(aura::Window* request_active, |
| 201 aura::Window* actual_active) { | 217 aura::Window* actual_active) { |
| 202 FOR_EACH_OBSERVER( | 218 FOR_EACH_OBSERVER( |
| 203 WmActivationObserver, activation_observers_, | 219 WmActivationObserver, activation_observers_, |
| 204 OnAttemptToReactivateWindow(WmWindowAura::Get(request_active), | 220 OnAttemptToReactivateWindow(WmWindowAura::Get(request_active), |
| 205 WmWindowAura::Get(actual_active))); | 221 WmWindowAura::Get(actual_active))); |
| 206 } | 222 } |
| 207 | 223 |
| 208 void WmShellAura::OnDisplayConfigurationChanging() { | 224 void WmShellAura::OnDisplayConfigurationChanging() { |
| 209 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 225 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 210 OnDisplayConfigurationChanging()); | 226 OnDisplayConfigurationChanging()); |
| 211 } | 227 } |
| 212 | 228 |
| 213 void WmShellAura::OnDisplayConfigurationChanged() { | 229 void WmShellAura::OnDisplayConfigurationChanged() { |
| 214 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 230 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
| 215 OnDisplayConfigurationChanged()); | 231 OnDisplayConfigurationChanged()); |
| 216 } | 232 } |
| 217 | 233 |
| 218 #if defined(OS_CHROMEOS) | |
| 219 void WmShellAura::ToggleIgnoreExternalKeyboard() { | |
| 220 Shell::GetInstance() | |
| 221 ->virtual_keyboard_controller() | |
| 222 ->ToggleIgnoreExternalKeyboard(); | |
| 223 } | |
| 224 #endif | |
| 225 | |
| 226 } // namespace ash | 234 } // namespace ash |
| OLD | NEW |