| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 63 } | 63 } | 
| 64 | 64 | 
| 65 void WMHelper::AddAccessibilityObserver(AccessibilityObserver* observer) { | 65 void WMHelper::AddAccessibilityObserver(AccessibilityObserver* observer) { | 
| 66   accessibility_observers_.AddObserver(observer); | 66   accessibility_observers_.AddObserver(observer); | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 void WMHelper::RemoveAccessibilityObserver(AccessibilityObserver* observer) { | 69 void WMHelper::RemoveAccessibilityObserver(AccessibilityObserver* observer) { | 
| 70   accessibility_observers_.RemoveObserver(observer); | 70   accessibility_observers_.RemoveObserver(observer); | 
| 71 } | 71 } | 
| 72 | 72 | 
|  | 73 void WMHelper::AddInputDeviceEventObserver(InputDeviceEventObserver* observer) { | 
|  | 74   input_device_event_observers_.AddObserver(observer); | 
|  | 75 } | 
|  | 76 | 
|  | 77 void WMHelper::RemoveInputDeviceEventObserver( | 
|  | 78     InputDeviceEventObserver* observer) { | 
|  | 79   input_device_event_observers_.RemoveObserver(observer); | 
|  | 80 } | 
|  | 81 | 
| 73 void WMHelper::NotifyWindowActivated(aura::Window* gained_active, | 82 void WMHelper::NotifyWindowActivated(aura::Window* gained_active, | 
| 74                                      aura::Window* lost_active) { | 83                                      aura::Window* lost_active) { | 
| 75   for (ActivationObserver& observer : activation_observers_) | 84   for (ActivationObserver& observer : activation_observers_) | 
| 76     observer.OnWindowActivated(gained_active, lost_active); | 85     observer.OnWindowActivated(gained_active, lost_active); | 
| 77 } | 86 } | 
| 78 | 87 | 
| 79 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus, | 88 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus, | 
| 80                                    aura::Window* lost_focus) { | 89                                    aura::Window* lost_focus) { | 
| 81   for (FocusObserver& observer : focus_observers_) | 90   for (FocusObserver& observer : focus_observers_) | 
| 82     observer.OnWindowFocused(gained_focus, lost_focus); | 91     observer.OnWindowFocused(gained_focus, lost_focus); | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 100 void WMHelper::NotifyMaximizeModeEnded() { | 109 void WMHelper::NotifyMaximizeModeEnded() { | 
| 101   for (MaximizeModeObserver& observer : maximize_mode_observers_) | 110   for (MaximizeModeObserver& observer : maximize_mode_observers_) | 
| 102     observer.OnMaximizeModeEnded(); | 111     observer.OnMaximizeModeEnded(); | 
| 103 } | 112 } | 
| 104 | 113 | 
| 105 void WMHelper::NotifyAccessibilityModeChanged() { | 114 void WMHelper::NotifyAccessibilityModeChanged() { | 
| 106   for (AccessibilityObserver& observer : accessibility_observers_) | 115   for (AccessibilityObserver& observer : accessibility_observers_) | 
| 107     observer.OnAccessibilityModeChanged(); | 116     observer.OnAccessibilityModeChanged(); | 
| 108 } | 117 } | 
| 109 | 118 | 
|  | 119 void WMHelper::NotifyKeyboardDeviceConfigurationChanged() { | 
|  | 120   for (InputDeviceEventObserver& observer : input_device_event_observers_) | 
|  | 121     observer.OnKeyboardDeviceConfigurationChanged(); | 
|  | 122 } | 
|  | 123 | 
| 110 }  // namespace exo | 124 }  // namespace exo | 
| OLD | NEW | 
|---|