Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: components/exo/wm_helper.cc

Issue 2640123004: Initial support for native accessibility in ARC (Closed)
Patch Set: Experimental changes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 21 matching lines...) Expand all
32 32
33 void WMHelper::AddActivationObserver(ActivationObserver* observer) { 33 void WMHelper::AddActivationObserver(ActivationObserver* observer) {
34 activation_observers_.AddObserver(observer); 34 activation_observers_.AddObserver(observer);
35 } 35 }
36 36
37 void WMHelper::RemoveActivationObserver(ActivationObserver* observer) { 37 void WMHelper::RemoveActivationObserver(ActivationObserver* observer) {
38 activation_observers_.RemoveObserver(observer); 38 activation_observers_.RemoveObserver(observer);
39 } 39 }
40 40
41 void WMHelper::AddFocusObserver(FocusObserver* observer) { 41 void WMHelper::AddFocusObserver(FocusObserver* observer) {
42 focus_observers_.AddObserver(observer); 42 if (!focus_observers_.HasObserver(observer))
43 focus_observers_.AddObserver(observer);
43 } 44 }
44 45
45 void WMHelper::RemoveFocusObserver(FocusObserver* observer) { 46 void WMHelper::RemoveFocusObserver(FocusObserver* observer) {
46 focus_observers_.RemoveObserver(observer); 47 focus_observers_.RemoveObserver(observer);
47 } 48 }
48 49
49 void WMHelper::AddCursorObserver(CursorObserver* observer) { 50 void WMHelper::AddCursorObserver(CursorObserver* observer) {
50 cursor_observers_.AddObserver(observer); 51 cursor_observers_.AddObserver(observer);
51 } 52 }
52 53
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 for (AccessibilityObserver& observer : accessibility_observers_) 116 for (AccessibilityObserver& observer : accessibility_observers_)
116 observer.OnAccessibilityModeChanged(); 117 observer.OnAccessibilityModeChanged();
117 } 118 }
118 119
119 void WMHelper::NotifyKeyboardDeviceConfigurationChanged() { 120 void WMHelper::NotifyKeyboardDeviceConfigurationChanged() {
120 for (InputDeviceEventObserver& observer : input_device_event_observers_) 121 for (InputDeviceEventObserver& observer : input_device_event_observers_)
121 observer.OnKeyboardDeviceConfigurationChanged(); 122 observer.OnKeyboardDeviceConfigurationChanged();
122 } 123 }
123 124
124 } // namespace exo 125 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698