| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 bool IsRafAlignedInputDisabled(); | 143 bool IsRafAlignedInputDisabled(); |
| 144 bool IsRafAlignedEvent(const std::unique_ptr<EventWithDispatchType>& event); | 144 bool IsRafAlignedEvent(const std::unique_ptr<EventWithDispatchType>& event); |
| 145 | 145 |
| 146 friend class MainThreadEventQueueTest; | 146 friend class MainThreadEventQueueTest; |
| 147 int routing_id_; | 147 int routing_id_; |
| 148 MainThreadEventQueueClient* client_; | 148 MainThreadEventQueueClient* client_; |
| 149 std::unique_ptr<EventWithDispatchType> in_flight_event_; | 149 std::unique_ptr<EventWithDispatchType> in_flight_event_; |
| 150 bool last_touch_start_forced_nonblocking_due_to_fling_; | 150 bool last_touch_start_forced_nonblocking_due_to_fling_; |
| 151 bool enable_fling_passive_listener_flag_; | 151 bool enable_fling_passive_listener_flag_; |
| 152 bool enable_non_blocking_due_to_main_thread_responsiveness_flag_; |
| 152 bool handle_raf_aligned_touch_input_; | 153 bool handle_raf_aligned_touch_input_; |
| 153 bool handle_raf_aligned_mouse_input_; | 154 bool handle_raf_aligned_mouse_input_; |
| 154 | 155 |
| 155 // Contains data to be shared between main thread and compositor thread. | 156 // Contains data to be shared between main thread and compositor thread. |
| 156 struct SharedState { | 157 struct SharedState { |
| 157 SharedState(); | 158 SharedState(); |
| 158 ~SharedState(); | 159 ~SharedState(); |
| 159 | 160 |
| 160 WebInputEventQueue<EventWithDispatchType> events_; | 161 WebInputEventQueue<EventWithDispatchType> events_; |
| 161 bool sent_main_frame_request_; | 162 bool sent_main_frame_request_; |
| 162 }; | 163 }; |
| 163 | 164 |
| 164 // Lock used to serialize |shared_state_|. | 165 // Lock used to serialize |shared_state_|. |
| 165 base::Lock shared_state_lock_; | 166 base::Lock shared_state_lock_; |
| 166 SharedState shared_state_; | 167 SharedState shared_state_; |
| 167 | 168 |
| 168 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 169 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 169 blink::scheduler::RendererScheduler* renderer_scheduler_; | 170 blink::scheduler::RendererScheduler* renderer_scheduler_; |
| 170 | 171 |
| 171 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); | 172 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
| 172 }; | 173 }; |
| 173 | 174 |
| 174 } // namespace content | 175 } // namespace content |
| 175 | 176 |
| 176 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 177 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
| OLD | NEW |