| 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 "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 InputEventAckState ack_result, | 111 InputEventAckState ack_result, |
| 112 uint32_t touch_event_id); | 112 uint32_t touch_event_id); |
| 113 | 113 |
| 114 void SendEventToMainThread(const blink::WebInputEvent* event, | 114 void SendEventToMainThread(const blink::WebInputEvent* event, |
| 115 const ui::LatencyInfo& latency, | 115 const ui::LatencyInfo& latency, |
| 116 InputEventDispatchType original_dispatch_type); | 116 InputEventDispatchType original_dispatch_type); |
| 117 | 117 |
| 118 bool IsRafAlignedInputDisabled() const; | 118 bool IsRafAlignedInputDisabled() const; |
| 119 bool IsRafAlignedEvent( | 119 bool IsRafAlignedEvent( |
| 120 const std::unique_ptr<MainThreadEventQueueTask>& item) const; | 120 const std::unique_ptr<MainThreadEventQueueTask>& item) const; |
| 121 void RafFallbackTimerFired(); |
| 121 | 122 |
| 122 friend class QueuedWebInputEvent; | 123 friend class QueuedWebInputEvent; |
| 123 friend class MainThreadEventQueueTest; | 124 friend class MainThreadEventQueueTest; |
| 124 friend class MainThreadEventQueueInitializationTest; | 125 friend class MainThreadEventQueueInitializationTest; |
| 125 MainThreadEventQueueClient* client_; | 126 MainThreadEventQueueClient* client_; |
| 126 bool last_touch_start_forced_nonblocking_due_to_fling_; | 127 bool last_touch_start_forced_nonblocking_due_to_fling_; |
| 127 bool enable_fling_passive_listener_flag_; | 128 bool enable_fling_passive_listener_flag_; |
| 128 bool enable_non_blocking_due_to_main_thread_responsiveness_flag_; | 129 bool enable_non_blocking_due_to_main_thread_responsiveness_flag_; |
| 129 base::TimeDelta main_thread_responsiveness_threshold_; | 130 base::TimeDelta main_thread_responsiveness_threshold_; |
| 130 bool handle_raf_aligned_touch_input_; | 131 bool handle_raf_aligned_touch_input_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 142 bool sent_post_task_; | 143 bool sent_post_task_; |
| 143 base::TimeTicks last_async_touch_move_timestamp_; | 144 base::TimeTicks last_async_touch_move_timestamp_; |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 // Lock used to serialize |shared_state_|. | 147 // Lock used to serialize |shared_state_|. |
| 147 base::Lock shared_state_lock_; | 148 base::Lock shared_state_lock_; |
| 148 SharedState shared_state_; | 149 SharedState shared_state_; |
| 149 | 150 |
| 150 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 151 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 151 blink::scheduler::RendererScheduler* renderer_scheduler_; | 152 blink::scheduler::RendererScheduler* renderer_scheduler_; |
| 153 base::OneShotTimer raf_fallback_timer_; |
| 152 | 154 |
| 153 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); | 155 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 } // namespace content | 158 } // namespace content |
| 157 | 159 |
| 158 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 160 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
| OLD | NEW |