Chromium Code Reviews| Index: content/renderer/input/passive_event_queue.h |
| diff --git a/content/renderer/input/passive_event_queue.h b/content/renderer/input/passive_event_queue.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..093b47ac1b70ee62b8623c16249ea8eabc60df93 |
| --- /dev/null |
| +++ b/content/renderer/input/passive_event_queue.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_INPUT_PASSIVE_EVENT_QUEUE_H_ |
| +#define CONTENT_RENDERER_INPUT_PASSIVE_EVENT_QUEUE_H_ |
| + |
| +#include <deque> |
| +#include "content/common/input/event_with_latency_info.h" |
| +#include "content/renderer/input/web_input_event_queue.h" |
| +#include "third_party/WebKit/public/web/WebInputEvent.h" |
| +#include "ui/events/latency_info.h" |
| + |
| +namespace content { |
| + |
| +class PassiveEventQueueClient { |
|
Rick Byers
2016/01/26 19:17:21
nit: I'm not sure the term "passive event" makes s
|
| + public: |
| + virtual void SendPassiveEvent(int routing_id, |
| + const blink::WebInputEvent* event, |
| + const ui::LatencyInfo& latency); |
| +}; |
| + |
| +class PassiveEventQueue { |
| + public: |
| + PassiveEventQueue(int routing_id, PassiveEventQueueClient* client); |
| + ~PassiveEventQueue(); |
| + |
| + void HandleNonBlockingEvent(const blink::WebInputEvent* event, |
| + const ui::LatencyInfo& latency); |
| + |
| + void EventHandled(blink::WebInputEvent::Type type); |
| + |
| + private: |
| + int routing_id_; |
| + PassiveEventQueueClient* client_; |
| + WebInputEventQueue<MouseWheelEventWithLatencyInfo> wheel_events_; |
| + WebInputEventQueue<TouchEventWithLatencyInfo> touch_events_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PassiveEventQueue); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_INPUT_WEB_INPUT_EVENT_QUEUE_H_ |