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

Side by Side Diff: ui/events/platform/platform_event_source.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_ 5 #ifndef UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_
6 #define UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_ 6 #define UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 private: 74 private:
75 friend class ScopedEventDispatcher; 75 friend class ScopedEventDispatcher;
76 static PlatformEventSource* instance_; 76 static PlatformEventSource* instance_;
77 77
78 // This is invoked when the list of dispatchers changes (i.e. a new dispatcher 78 // This is invoked when the list of dispatchers changes (i.e. a new dispatcher
79 // is added, or a dispatcher is removed). 79 // is added, or a dispatcher is removed).
80 virtual void OnDispatcherListChanged(); 80 virtual void OnDispatcherListChanged();
81 81
82 void OnOverriddenDispatcherRestored(); 82 void OnOverriddenDispatcherRestored();
83 83
84 // Use an ObserverList<> instead of an std::vector<> to store the list of 84 // Use an base::ObserverList<> instead of an std::vector<> to store the list
85 // of
85 // dispatchers, so that adding/removing dispatchers during an event dispatch 86 // dispatchers, so that adding/removing dispatchers during an event dispatch
86 // is well-defined. 87 // is well-defined.
87 typedef ObserverList<PlatformEventDispatcher> PlatformEventDispatcherList; 88 typedef base::ObserverList<PlatformEventDispatcher>
89 PlatformEventDispatcherList;
88 PlatformEventDispatcherList dispatchers_; 90 PlatformEventDispatcherList dispatchers_;
89 PlatformEventDispatcher* overridden_dispatcher_; 91 PlatformEventDispatcher* overridden_dispatcher_;
90 92
91 // Used to keep track of whether the current override-dispatcher has been 93 // Used to keep track of whether the current override-dispatcher has been
92 // reset and a previous override-dispatcher has been restored. 94 // reset and a previous override-dispatcher has been restored.
93 bool overridden_dispatcher_restored_; 95 bool overridden_dispatcher_restored_;
94 96
95 ObserverList<PlatformEventObserver> observers_; 97 base::ObserverList<PlatformEventObserver> observers_;
96 98
97 DISALLOW_COPY_AND_ASSIGN(PlatformEventSource); 99 DISALLOW_COPY_AND_ASSIGN(PlatformEventSource);
98 }; 100 };
99 101
100 } // namespace ui 102 } // namespace ui
101 103
102 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_ 104 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/device/udev/device_manager_udev.h ('k') | ui/events/platform/platform_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698