| 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 "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 10 #include "content/common/input/event_with_latency_info.h" | 11 #include "content/common/input/event_with_latency_info.h" |
| 11 #include "content/common/input/input_event_ack_state.h" | 12 #include "content/common/input/input_event_ack_state.h" |
| 12 #include "content/common/input/input_event_dispatch_type.h" | 13 #include "content/common/input/input_event_dispatch_type.h" |
| 13 #include "content/common/input/web_input_event_queue.h" | 14 #include "content/common/input/web_input_event_queue.h" |
| 15 #include "content/public/common/content_features.h" |
| 14 #include "third_party/WebKit/public/web/WebInputEvent.h" | 16 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 15 #include "ui/events/blink/web_input_event_traits.h" | 17 #include "ui/events/blink/web_input_event_traits.h" |
| 16 #include "ui/events/latency_info.h" | 18 #include "ui/events/latency_info.h" |
| 17 | 19 |
| 18 namespace content { | 20 namespace content { |
| 19 | 21 |
| 20 class EventWithDispatchType : public ScopedWebInputEventWithLatencyInfo { | 22 class EventWithDispatchType : public ScopedWebInputEventWithLatencyInfo { |
| 21 public: | 23 public: |
| 22 EventWithDispatchType(ui::ScopedWebInputEvent event, | 24 EventWithDispatchType(ui::ScopedWebInputEvent event, |
| 23 const ui::LatencyInfo& latency, | 25 const ui::LatencyInfo& latency, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void SendEventToMainThread(const blink::WebInputEvent* event, | 126 void SendEventToMainThread(const blink::WebInputEvent* event, |
| 125 const ui::LatencyInfo& latency, | 127 const ui::LatencyInfo& latency, |
| 126 InputEventDispatchType original_dispatch_type); | 128 InputEventDispatchType original_dispatch_type); |
| 127 | 129 |
| 128 friend class MainThreadEventQueueTest; | 130 friend class MainThreadEventQueueTest; |
| 129 int routing_id_; | 131 int routing_id_; |
| 130 MainThreadEventQueueClient* client_; | 132 MainThreadEventQueueClient* client_; |
| 131 WebInputEventQueue<EventWithDispatchType> events_; | 133 WebInputEventQueue<EventWithDispatchType> events_; |
| 132 std::unique_ptr<EventWithDispatchType> in_flight_event_; | 134 std::unique_ptr<EventWithDispatchType> in_flight_event_; |
| 133 bool is_flinging_; | 135 bool is_flinging_; |
| 136 bool last_touch_start_forced_nonblocking_; |
| 137 bool enable_fling_passive_listener_flag_; |
| 134 | 138 |
| 135 base::Lock event_queue_lock_; | 139 base::Lock event_queue_lock_; |
| 136 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 140 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 137 | 141 |
| 138 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); | 142 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
| 139 }; | 143 }; |
| 140 | 144 |
| 141 } // namespace content | 145 } // namespace content |
| 142 | 146 |
| 143 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 147 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
| OLD | NEW |