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

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

Issue 2581243004: Pass main thread responsiveness threshold via Finch (Closed)
Patch Set: Created 4 years 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 "base/feature_list.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool IsRafAlignedInputDisabled(); 147 bool IsRafAlignedInputDisabled();
148 bool IsRafAlignedEvent(const blink::WebInputEvent& event); 148 bool IsRafAlignedEvent(const blink::WebInputEvent& event);
149 149
150 friend class MainThreadEventQueueTest; 150 friend class MainThreadEventQueueTest;
151 int routing_id_; 151 int routing_id_;
152 MainThreadEventQueueClient* client_; 152 MainThreadEventQueueClient* client_;
153 std::unique_ptr<EventWithDispatchType> in_flight_event_; 153 std::unique_ptr<EventWithDispatchType> in_flight_event_;
154 bool last_touch_start_forced_nonblocking_due_to_fling_; 154 bool last_touch_start_forced_nonblocking_due_to_fling_;
155 bool enable_fling_passive_listener_flag_; 155 bool enable_fling_passive_listener_flag_;
156 bool enable_non_blocking_due_to_main_thread_responsiveness_flag_; 156 bool enable_non_blocking_due_to_main_thread_responsiveness_flag_;
157 base::TimeDelta main_thread_responsiveness_threshold_;
157 bool handle_raf_aligned_touch_input_; 158 bool handle_raf_aligned_touch_input_;
158 bool handle_raf_aligned_mouse_input_; 159 bool handle_raf_aligned_mouse_input_;
159 160
160 // Contains data to be shared between main thread and compositor thread. 161 // Contains data to be shared between main thread and compositor thread.
161 struct SharedState { 162 struct SharedState {
162 SharedState(); 163 SharedState();
163 ~SharedState(); 164 ~SharedState();
164 165
165 WebInputEventQueue<EventWithDispatchType> events_; 166 WebInputEventQueue<EventWithDispatchType> events_;
166 bool sent_main_frame_request_; 167 bool sent_main_frame_request_;
167 }; 168 };
168 169
169 // Lock used to serialize |shared_state_|. 170 // Lock used to serialize |shared_state_|.
170 base::Lock shared_state_lock_; 171 base::Lock shared_state_lock_;
171 SharedState shared_state_; 172 SharedState shared_state_;
172 173
173 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 174 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
174 blink::scheduler::RendererScheduler* renderer_scheduler_; 175 blink::scheduler::RendererScheduler* renderer_scheduler_;
175 176
176 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); 177 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue);
177 }; 178 };
178 179
179 } // namespace content 180 } // namespace content
180 181
181 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ 182 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698