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

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

Issue 2581243004: Pass main thread responsiveness threshold via Finch (Closed)
Patch Set: Use EXPECT_FALSE/TRUE - avoids compile error. Created 3 years, 10 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
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
142 void PossiblyScheduleMainFrame(); 142 void PossiblyScheduleMainFrame();
143 143
144 void SendEventToMainThread(const blink::WebInputEvent* event, 144 void SendEventToMainThread(const blink::WebInputEvent* event,
145 const ui::LatencyInfo& latency, 145 const ui::LatencyInfo& latency,
146 InputEventDispatchType original_dispatch_type); 146 InputEventDispatchType original_dispatch_type);
147 147
148 bool IsRafAlignedInputDisabled(); 148 bool IsRafAlignedInputDisabled();
149 bool IsRafAlignedEvent(const blink::WebInputEvent& event); 149 bool IsRafAlignedEvent(const blink::WebInputEvent& event);
150 150
151 friend class MainThreadEventQueueTest; 151 friend class MainThreadEventQueueTest;
152 friend class MainThreadEventQueueInitializationTest;
152 int routing_id_; 153 int routing_id_;
153 MainThreadEventQueueClient* client_; 154 MainThreadEventQueueClient* client_;
154 std::unique_ptr<EventWithDispatchType> in_flight_event_; 155 std::unique_ptr<EventWithDispatchType> in_flight_event_;
155 bool last_touch_start_forced_nonblocking_due_to_fling_; 156 bool last_touch_start_forced_nonblocking_due_to_fling_;
156 bool enable_fling_passive_listener_flag_; 157 bool enable_fling_passive_listener_flag_;
157 bool enable_non_blocking_due_to_main_thread_responsiveness_flag_; 158 bool enable_non_blocking_due_to_main_thread_responsiveness_flag_;
159 base::TimeDelta main_thread_responsiveness_threshold_;
158 bool handle_raf_aligned_touch_input_; 160 bool handle_raf_aligned_touch_input_;
159 bool handle_raf_aligned_mouse_input_; 161 bool handle_raf_aligned_mouse_input_;
160 162
161 // Contains data to be shared between main thread and compositor thread. 163 // Contains data to be shared between main thread and compositor thread.
162 struct SharedState { 164 struct SharedState {
163 SharedState(); 165 SharedState();
164 ~SharedState(); 166 ~SharedState();
165 167
166 WebInputEventQueue<EventWithDispatchType> events_; 168 WebInputEventQueue<EventWithDispatchType> events_;
167 bool sent_main_frame_request_; 169 bool sent_main_frame_request_;
168 }; 170 };
169 171
170 // Lock used to serialize |shared_state_|. 172 // Lock used to serialize |shared_state_|.
171 base::Lock shared_state_lock_; 173 base::Lock shared_state_lock_;
172 SharedState shared_state_; 174 SharedState shared_state_;
173 175
174 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 176 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
175 blink::scheduler::RendererScheduler* renderer_scheduler_; 177 blink::scheduler::RendererScheduler* renderer_scheduler_;
176 178
177 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); 179 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue);
178 }; 180 };
179 181
180 } // namespace content 182 } // namespace content
181 183
182 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ 184 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698