| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 5 #ifndef CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
| 6 #define CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 6 #define CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 base::TimeTicks last_coalesced_timestamp_; | 55 base::TimeTicks last_coalesced_timestamp_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class CONTENT_EXPORT MainThreadEventQueueClient { | 58 class CONTENT_EXPORT MainThreadEventQueueClient { |
| 59 public: | 59 public: |
| 60 // Handle an |event| that was previously queued (possibly | 60 // Handle an |event| that was previously queued (possibly |
| 61 // coalesced with another event) to the |routing_id|'s | 61 // coalesced with another event) to the |routing_id|'s |
| 62 // channel. Implementors must implement this callback. | 62 // channel. Implementors must implement this callback. |
| 63 virtual void HandleEventOnMainThread( | 63 virtual void HandleEventOnMainThread( |
| 64 int routing_id, | 64 int routing_id, |
| 65 const blink::WebInputEvent* event, | 65 const blink::WebCoalescedInputEvent* event, |
| 66 const ui::LatencyInfo& latency, | 66 const ui::LatencyInfo& latency, |
| 67 InputEventDispatchType dispatch_type) = 0; | 67 InputEventDispatchType dispatch_type) = 0; |
| 68 | 68 |
| 69 virtual void SendInputEventAck(int routing_id, | 69 virtual void SendInputEventAck(int routing_id, |
| 70 blink::WebInputEvent::Type type, | 70 blink::WebInputEvent::Type type, |
| 71 InputEventAckState ack_result, | 71 InputEventAckState ack_result, |
| 72 uint32_t touch_event_id) = 0; | 72 uint32_t touch_event_id) = 0; |
| 73 virtual void NeedsMainFrame(int routing_id) = 0; | 73 virtual void NeedsMainFrame(int routing_id) = 0; |
| 74 }; | 74 }; |
| 75 | 75 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 173 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 174 blink::scheduler::RendererScheduler* renderer_scheduler_; | 174 blink::scheduler::RendererScheduler* renderer_scheduler_; |
| 175 | 175 |
| 176 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); | 176 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 } // namespace content | 179 } // namespace content |
| 180 | 180 |
| 181 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 181 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
| OLD | NEW |