| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // a non-blocking event to be queued to the main thread. | 122 // a non-blocking event to be queued to the main thread. |
| 123 bool HandleEvent(blink::WebScopedInputEvent event, | 123 bool HandleEvent(blink::WebScopedInputEvent event, |
| 124 const ui::LatencyInfo& latency, | 124 const ui::LatencyInfo& latency, |
| 125 InputEventDispatchType dispatch_type, | 125 InputEventDispatchType dispatch_type, |
| 126 InputEventAckState ack_result); | 126 InputEventAckState ack_result); |
| 127 void DispatchRafAlignedInput(); | 127 void DispatchRafAlignedInput(); |
| 128 | 128 |
| 129 // Call once the main thread has handled an outstanding |type| event | 129 // Call once the main thread has handled an outstanding |type| event |
| 130 // in flight. | 130 // in flight. |
| 131 void EventHandled(blink::WebInputEvent::Type type, | 131 void EventHandled(blink::WebInputEvent::Type type, |
| 132 blink::WebInputEventResult result, |
| 132 InputEventAckState ack_result); | 133 InputEventAckState ack_result); |
| 133 | 134 |
| 134 private: | 135 private: |
| 135 friend class base::RefCountedThreadSafe<MainThreadEventQueue>; | 136 friend class base::RefCountedThreadSafe<MainThreadEventQueue>; |
| 136 ~MainThreadEventQueue(); | 137 ~MainThreadEventQueue(); |
| 137 void QueueEvent(std::unique_ptr<EventWithDispatchType> event); | 138 void QueueEvent(std::unique_ptr<EventWithDispatchType> event); |
| 138 void SendEventNotificationToMainThread(); | 139 void SendEventNotificationToMainThread(); |
| 139 void DispatchSingleEvent(); | 140 void DispatchSingleEvent(); |
| 140 void DispatchInFlightEvent(); | 141 void DispatchInFlightEvent(); |
| 141 void PossiblyScheduleMainFrame(); | 142 void PossiblyScheduleMainFrame(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 172 | 173 |
| 173 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 174 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 174 blink::scheduler::RendererScheduler* renderer_scheduler_; | 175 blink::scheduler::RendererScheduler* renderer_scheduler_; |
| 175 | 176 |
| 176 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); | 177 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
| 177 }; | 178 }; |
| 178 | 179 |
| 179 } // namespace content | 180 } // namespace content |
| 180 | 181 |
| 181 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 182 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
| OLD | NEW |