OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EVENT_SOURCE_H_ | 5 #ifndef UI_EVENTS_EVENT_SOURCE_H_ |
6 #define UI_EVENTS_EVENT_SOURCE_H_ | 6 #define UI_EVENTS_EVENT_SOURCE_H_ |
7 | 7 |
| 8 #include "ui/events/event_dispatcher.h" |
8 #include "ui/events/events_export.h" | 9 #include "ui/events/events_export.h" |
9 | 10 |
10 namespace ui { | 11 namespace ui { |
11 | 12 |
12 class Event; | 13 class Event; |
13 class EventProcessor; | 14 class EventProcessor; |
14 | 15 |
15 // EventSource receives events from the native platform (e.g. X11, win32 etc.) | 16 // EventSource receives events from the native platform (e.g. X11, win32 etc.) |
16 // and sends the events to an EventProcessor. | 17 // and sends the events to an EventProcessor. |
17 class EVENTS_EXPORT EventSource { | 18 class EVENTS_EXPORT EventSource { |
18 public: | 19 public: |
19 virtual ~EventSource() {} | 20 virtual ~EventSource() {} |
20 | 21 |
21 virtual EventProcessor* GetEventProcessor() = 0; | 22 virtual EventProcessor* GetEventProcessor() = 0; |
22 | 23 |
23 protected: | 24 protected: |
24 void SendEventToProcessor(Event* event); | 25 EventDispatchDetails SendEventToProcessor(Event* event); |
25 }; | 26 }; |
26 | 27 |
27 } // namespace ui | 28 } // namespace ui |
28 | 29 |
29 #endif // UI_EVENTS_EVENT_SOURCE_H_ | 30 #endif // UI_EVENTS_EVENT_SOURCE_H_ |
OLD | NEW |