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" |
14 #include "content/common/input/web_input_event_traits.h" | 15 #include "content/common/input/web_input_event_traits.h" |
| 16 #include "content/public/common/content_features.h" |
15 #include "third_party/WebKit/public/web/WebInputEvent.h" | 17 #include "third_party/WebKit/public/web/WebInputEvent.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(ScopedWebInputEvent event, | 24 EventWithDispatchType(ScopedWebInputEvent event, |
23 const ui::LatencyInfo& latency, | 25 const ui::LatencyInfo& latency, |
24 InputEventDispatchType dispatch_type); | 26 InputEventDispatchType dispatch_type); |
(...skipping 99 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 is_last_touch_start_force_passive_; |
134 | 137 |
135 base::Lock event_queue_lock_; | 138 base::Lock event_queue_lock_; |
136 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 139 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
137 | 140 |
138 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); | 141 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
139 }; | 142 }; |
140 | 143 |
141 } // namespace content | 144 } // namespace content |
142 | 145 |
143 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 146 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
OLD | NEW |