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

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

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased 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
« no previous file with comments | « ui/events/latency_info.cc ('k') | ui/events/platform/platform_event_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // stream of events and wait until the next iteration of the message-loop to 74 // stream of events and wait until the next iteration of the message-loop to
75 // dispatch the rest of the events. 75 // dispatch the rest of the events.
76 virtual void StopCurrentEventStream(); 76 virtual void StopCurrentEventStream();
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 a base::ObserverList<> instead of an std::vector<> to store the list of
85 // dispatchers, so that adding/removing dispatchers during an event dispatch 85 // dispatchers, so that adding/removing dispatchers during an event dispatch
86 // is well-defined. 86 // is well-defined.
87 typedef ObserverList<PlatformEventDispatcher> PlatformEventDispatcherList; 87 typedef base::ObserverList<PlatformEventDispatcher>
88 PlatformEventDispatcherList;
88 PlatformEventDispatcherList dispatchers_; 89 PlatformEventDispatcherList dispatchers_;
89 PlatformEventDispatcher* overridden_dispatcher_; 90 PlatformEventDispatcher* overridden_dispatcher_;
90 91
91 // Used to keep track of whether the current override-dispatcher has been 92 // Used to keep track of whether the current override-dispatcher has been
92 // reset and a previous override-dispatcher has been restored. 93 // reset and a previous override-dispatcher has been restored.
93 bool overridden_dispatcher_restored_; 94 bool overridden_dispatcher_restored_;
94 95
95 ObserverList<PlatformEventObserver> observers_; 96 base::ObserverList<PlatformEventObserver> observers_;
96 97
97 DISALLOW_COPY_AND_ASSIGN(PlatformEventSource); 98 DISALLOW_COPY_AND_ASSIGN(PlatformEventSource);
98 }; 99 };
99 100
100 } // namespace ui 101 } // namespace ui
101 102
102 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_ 103 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_
OLDNEW
« no previous file with comments | « ui/events/latency_info.cc ('k') | ui/events/platform/platform_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698