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

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

Issue 219743002: x11: Move X event handling out of the message-pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r261267 Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/events/events.gyp ('k') | ui/events/platform/platform_event_source_stub.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 29 matching lines...) Expand all
40 // The returned |ScopedEventDispatcher| object is a handler for the overridden 40 // The returned |ScopedEventDispatcher| object is a handler for the overridden
41 // dispatcher. When this handler is destroyed, it removes the overridden 41 // dispatcher. When this handler is destroyed, it removes the overridden
42 // dispatcher, and restores the previous override-dispatcher (or NULL if there 42 // dispatcher, and restores the previous override-dispatcher (or NULL if there
43 // wasn't any). 43 // wasn't any).
44 scoped_ptr<ScopedEventDispatcher> OverrideDispatcher( 44 scoped_ptr<ScopedEventDispatcher> OverrideDispatcher(
45 PlatformEventDispatcher* dispatcher); 45 PlatformEventDispatcher* dispatcher);
46 46
47 void AddPlatformEventObserver(PlatformEventObserver* observer); 47 void AddPlatformEventObserver(PlatformEventObserver* observer);
48 void RemovePlatformEventObserver(PlatformEventObserver* observer); 48 void RemovePlatformEventObserver(PlatformEventObserver* observer);
49 49
50 static scoped_ptr<PlatformEventSource> CreateDefault();
51
50 protected: 52 protected:
51 PlatformEventSource(); 53 PlatformEventSource();
52 54
53 // Dispatches |platform_event| to the dispatchers. If there is an override 55 // Dispatches |platform_event| to the dispatchers. If there is an override
54 // dispatcher installed using |OverrideDispatcher()|, then that dispatcher 56 // dispatcher installed using |OverrideDispatcher()|, then that dispatcher
55 // receives the event first. |POST_DISPATCH_QUIT_LOOP| flag is set in the 57 // receives the event first. |POST_DISPATCH_QUIT_LOOP| flag is set in the
56 // returned value if the event-source should stop dispatching events at the 58 // returned value if the event-source should stop dispatching events at the
57 // current message-loop iteration. 59 // current message-loop iteration.
58 virtual uint32_t DispatchEvent(PlatformEvent platform_event); 60 virtual uint32_t DispatchEvent(PlatformEvent platform_event);
59 61
(...skipping 19 matching lines...) Expand all
79 bool overridden_dispatcher_restored_; 81 bool overridden_dispatcher_restored_;
80 82
81 ObserverList<PlatformEventObserver> observers_; 83 ObserverList<PlatformEventObserver> observers_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(PlatformEventSource); 85 DISALLOW_COPY_AND_ASSIGN(PlatformEventSource);
84 }; 86 };
85 87
86 } // namespace ui 88 } // namespace ui
87 89
88 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_ 90 #endif // UI_EVENTS_PLATFORM_PLATFORM_EVENT_SOURCE_H_
OLDNEW
« no previous file with comments | « ui/events/events.gyp ('k') | ui/events/platform/platform_event_source_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698