Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Side by Side Diff: content/renderer/input/main_thread_event_queue.h

Issue 2233543002: Make first TouchStart and first TouchMove events on a flinging layer non-blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_due_to_fling_;
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_
OLDNEW
« no previous file with comments | « content/common/input/event_with_latency_info_unittest.cc ('k') | content/renderer/input/main_thread_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698