| 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 "components/exo/wm_helper.h" | 5 #include "components/exo/wm_helper.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 | 8 |
| 9 namespace exo { | 9 namespace exo { |
| 10 namespace { | 10 namespace { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 void WMHelper::AddInputDeviceEventObserver(InputDeviceEventObserver* observer) { | 73 void WMHelper::AddInputDeviceEventObserver(InputDeviceEventObserver* observer) { |
| 74 input_device_event_observers_.AddObserver(observer); | 74 input_device_event_observers_.AddObserver(observer); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WMHelper::RemoveInputDeviceEventObserver( | 77 void WMHelper::RemoveInputDeviceEventObserver( |
| 78 InputDeviceEventObserver* observer) { | 78 InputDeviceEventObserver* observer) { |
| 79 input_device_event_observers_.RemoveObserver(observer); | 79 input_device_event_observers_.RemoveObserver(observer); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void WMHelper::AddDisplayConfigurationObserver( |
| 83 DisplayConfigurationObserver* observer) { |
| 84 display_config_observers_.AddObserver(observer); |
| 85 } |
| 86 |
| 87 void WMHelper::RemoveDisplayConfigurationObserver( |
| 88 DisplayConfigurationObserver* observer) { |
| 89 display_config_observers_.RemoveObserver(observer); |
| 90 } |
| 91 |
| 82 void WMHelper::NotifyWindowActivated(aura::Window* gained_active, | 92 void WMHelper::NotifyWindowActivated(aura::Window* gained_active, |
| 83 aura::Window* lost_active) { | 93 aura::Window* lost_active) { |
| 84 for (ActivationObserver& observer : activation_observers_) | 94 for (ActivationObserver& observer : activation_observers_) |
| 85 observer.OnWindowActivated(gained_active, lost_active); | 95 observer.OnWindowActivated(gained_active, lost_active); |
| 86 } | 96 } |
| 87 | 97 |
| 88 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus, | 98 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus, |
| 89 aura::Window* lost_focus) { | 99 aura::Window* lost_focus) { |
| 90 for (FocusObserver& observer : focus_observers_) | 100 for (FocusObserver& observer : focus_observers_) |
| 91 observer.OnWindowFocused(gained_focus, lost_focus); | 101 observer.OnWindowFocused(gained_focus, lost_focus); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 119 void WMHelper::NotifyAccessibilityModeChanged() { | 129 void WMHelper::NotifyAccessibilityModeChanged() { |
| 120 for (AccessibilityObserver& observer : accessibility_observers_) | 130 for (AccessibilityObserver& observer : accessibility_observers_) |
| 121 observer.OnAccessibilityModeChanged(); | 131 observer.OnAccessibilityModeChanged(); |
| 122 } | 132 } |
| 123 | 133 |
| 124 void WMHelper::NotifyKeyboardDeviceConfigurationChanged() { | 134 void WMHelper::NotifyKeyboardDeviceConfigurationChanged() { |
| 125 for (InputDeviceEventObserver& observer : input_device_event_observers_) | 135 for (InputDeviceEventObserver& observer : input_device_event_observers_) |
| 126 observer.OnKeyboardDeviceConfigurationChanged(); | 136 observer.OnKeyboardDeviceConfigurationChanged(); |
| 127 } | 137 } |
| 128 | 138 |
| 139 void WMHelper::NotifyDisplayConfigurationChanged() { |
| 140 for (DisplayConfigurationObserver& observer : display_config_observers_) |
| 141 observer.OnDisplayConfigurationChanged(); |
| 142 } |
| 143 |
| 129 } // namespace exo | 144 } // namespace exo |
| OLD | NEW |