Chromium Code Reviews| 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_PASSIVE_EVENT_QUEUE_H_ | |
| 6 #define CONTENT_RENDERER_INPUT_PASSIVE_EVENT_QUEUE_H_ | |
| 7 | |
| 8 #include <deque> | |
| 9 #include "content/common/input/event_with_latency_info.h" | |
| 10 #include "content/renderer/input/web_input_event_queue.h" | |
| 11 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
| 12 #include "ui/events/latency_info.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class PassiveEventQueueClient { | |
|
Rick Byers
2016/01/26 19:17:21
nit: I'm not sure the term "passive event" makes s
| |
| 17 public: | |
| 18 virtual void SendPassiveEvent(int routing_id, | |
| 19 const blink::WebInputEvent* event, | |
| 20 const ui::LatencyInfo& latency); | |
| 21 }; | |
| 22 | |
| 23 class PassiveEventQueue { | |
| 24 public: | |
| 25 PassiveEventQueue(int routing_id, PassiveEventQueueClient* client); | |
| 26 ~PassiveEventQueue(); | |
| 27 | |
| 28 void HandleNonBlockingEvent(const blink::WebInputEvent* event, | |
| 29 const ui::LatencyInfo& latency); | |
| 30 | |
| 31 void EventHandled(blink::WebInputEvent::Type type); | |
| 32 | |
| 33 private: | |
| 34 int routing_id_; | |
| 35 PassiveEventQueueClient* client_; | |
| 36 WebInputEventQueue<MouseWheelEventWithLatencyInfo> wheel_events_; | |
| 37 WebInputEventQueue<TouchEventWithLatencyInfo> touch_events_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(PassiveEventQueue); | |
| 40 }; | |
| 41 | |
| 42 } // namespace content | |
| 43 | |
| 44 #endif // CONTENT_RENDERER_INPUT_WEB_INPUT_EVENT_QUEUE_H_ | |
| OLD | NEW |