| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 void WMHelper::AddCursorObserver(CursorObserver* observer) { | 49 void WMHelper::AddCursorObserver(CursorObserver* observer) { |
| 50 cursor_observers_.AddObserver(observer); | 50 cursor_observers_.AddObserver(observer); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void WMHelper::RemoveCursorObserver(CursorObserver* observer) { | 53 void WMHelper::RemoveCursorObserver(CursorObserver* observer) { |
| 54 cursor_observers_.RemoveObserver(observer); | 54 cursor_observers_.RemoveObserver(observer); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WMHelper::AddMaximizeModeObserver(MaximizeModeObserver* observer) { | 57 void WMHelper::AddShellObserver(ShellObserver* observer) { |
| 58 maximize_mode_observers_.AddObserver(observer); | 58 shell_observers_.AddObserver(observer); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void WMHelper::RemoveMaximizeModeObserver(MaximizeModeObserver* observer) { | 61 void WMHelper::RemoveShellObserver(ShellObserver* observer) { |
| 62 maximize_mode_observers_.RemoveObserver(observer); | 62 shell_observers_.RemoveObserver(observer); |
| 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 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 95 for (CursorObserver& observer : cursor_observers_) | 95 for (CursorObserver& observer : cursor_observers_) |
| 96 observer.OnCursorVisibilityChanged(is_visible); | 96 observer.OnCursorVisibilityChanged(is_visible); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void WMHelper::NotifyCursorSetChanged(ui::CursorSetType cursor_set) { | 99 void WMHelper::NotifyCursorSetChanged(ui::CursorSetType cursor_set) { |
| 100 for (CursorObserver& observer : cursor_observers_) | 100 for (CursorObserver& observer : cursor_observers_) |
| 101 observer.OnCursorSetChanged(cursor_set); | 101 observer.OnCursorSetChanged(cursor_set); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void WMHelper::NotifyMaximizeModeStarted() { | 104 void WMHelper::NotifyMaximizeModeStarted() { |
| 105 for (MaximizeModeObserver& observer : maximize_mode_observers_) | 105 for (ShellObserver& observer : shell_observers_) |
| 106 observer.OnMaximizeModeStarted(); | 106 observer.OnMaximizeModeStarted(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void WMHelper::NotifyMaximizeModeEnded() { | 109 void WMHelper::NotifyMaximizeModeEnded() { |
| 110 for (MaximizeModeObserver& observer : maximize_mode_observers_) | 110 for (ShellObserver& observer : shell_observers_) |
| 111 observer.OnMaximizeModeEnded(); | 111 observer.OnMaximizeModeEnded(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void WMHelper::NotifyOverviewModeStarted() { |
| 115 for (ShellObserver& observer : shell_observers_) |
| 116 observer.OnOverviewModeStarted(); |
| 117 } |
| 118 |
| 119 void WMHelper::NotifyOverviewModeEnded() { |
| 120 for (ShellObserver& observer : shell_observers_) |
| 121 observer.OnOverviewModeEnded(); |
| 122 } |
| 123 |
| 114 void WMHelper::NotifyAccessibilityModeChanged() { | 124 void WMHelper::NotifyAccessibilityModeChanged() { |
| 115 for (AccessibilityObserver& observer : accessibility_observers_) | 125 for (AccessibilityObserver& observer : accessibility_observers_) |
| 116 observer.OnAccessibilityModeChanged(); | 126 observer.OnAccessibilityModeChanged(); |
| 117 } | 127 } |
| 118 | 128 |
| 119 void WMHelper::NotifyKeyboardDeviceConfigurationChanged() { | 129 void WMHelper::NotifyKeyboardDeviceConfigurationChanged() { |
| 120 for (InputDeviceEventObserver& observer : input_device_event_observers_) | 130 for (InputDeviceEventObserver& observer : input_device_event_observers_) |
| 121 observer.OnKeyboardDeviceConfigurationChanged(); | 131 observer.OnKeyboardDeviceConfigurationChanged(); |
| 122 } | 132 } |
| 123 | 133 |
| 124 } // namespace exo | 134 } // namespace exo |
| OLD | NEW |