OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_RENDERER_INPUT_NON_BLOCKING_EVENT_QUEUE_H_ | |
6 #define CONTENT_RENDERER_INPUT_NON_BLOCKING_EVENT_QUEUE_H_ | |
7 | |
8 #include <deque> | |
9 #include "content/common/content_export.h" | |
10 #include "content/common/input/event_with_latency_info.h" | |
11 #include "content/common/input/web_input_event_queue.h" | |
12 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
13 #include "ui/events/latency_info.h" | |
14 | |
15 namespace content { | |
16 | |
17 class CONTENT_EXPORT NonBlockingEventQueueClient { | |
18 public: | |
19 virtual void SendNonBlockingEvent(int routing_id, | |
Charlie Reis
2016/02/16 22:25:22
Add comment making it clearer what the client is e
dtapuska
2016/02/17 03:34:57
Done.
| |
20 const blink::WebInputEvent* event, | |
21 const ui::LatencyInfo& latency) = 0; | |
22 }; | |
23 | |
24 class CONTENT_EXPORT NonBlockingEventQueue { | |
Charlie Reis
2016/02/16 22:25:22
Please add some class-level comments to help other
dtapuska
2016/02/17 03:34:57
Done.
| |
25 public: | |
26 NonBlockingEventQueue(int routing_id, NonBlockingEventQueueClient* client); | |
27 ~NonBlockingEventQueue(); | |
28 | |
29 void HandleEvent(const blink::WebInputEvent* event, | |
30 const ui::LatencyInfo& latency); | |
31 | |
32 void EventHandled(blink::WebInputEvent::Type type); | |
33 | |
34 private: | |
35 friend class NonBlockingEventQueueTest; | |
36 int routing_id_; | |
37 NonBlockingEventQueueClient* client_; | |
38 WebInputEventQueue<MouseWheelEventWithLatencyInfo> wheel_events_; | |
39 WebInputEventQueue<TouchEventWithLatencyInfo> touch_events_; | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(NonBlockingEventQueue); | |
42 }; | |
43 | |
44 } // namespace content | |
45 | |
46 #endif // CONTENT_RENDERER_INPUT_NON_BLOCKING_EVENT_QUEUE_H_ | |
OLD | NEW |