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 "base/feature_list.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // (deque) | 74 // (deque) |
75 // (deque) | 75 // (deque) |
76 // <-------(ACK)------ | 76 // <-------(ACK)------ |
77 // | 77 // |
78 class CONTENT_EXPORT MainThreadEventQueue | 78 class CONTENT_EXPORT MainThreadEventQueue |
79 : public base::RefCountedThreadSafe<MainThreadEventQueue> { | 79 : public base::RefCountedThreadSafe<MainThreadEventQueue> { |
80 public: | 80 public: |
81 MainThreadEventQueue( | 81 MainThreadEventQueue( |
82 MainThreadEventQueueClient* client, | 82 MainThreadEventQueueClient* client, |
83 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, | 83 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, |
84 blink::scheduler::RendererScheduler* renderer_scheduler); | 84 blink::scheduler::RendererScheduler* renderer_scheduler, |
| 85 bool allow_raf_aligned_input); |
85 | 86 |
86 // Called once the compositor has handled |event| and indicated that it is | 87 // Called once the compositor has handled |event| and indicated that it is |
87 // a non-blocking event to be queued to the main thread. | 88 // a non-blocking event to be queued to the main thread. |
88 bool HandleEvent(ui::WebScopedInputEvent event, | 89 bool HandleEvent(ui::WebScopedInputEvent event, |
89 const ui::LatencyInfo& latency, | 90 const ui::LatencyInfo& latency, |
90 InputEventDispatchType dispatch_type, | 91 InputEventDispatchType dispatch_type, |
91 InputEventAckState ack_result); | 92 InputEventAckState ack_result); |
92 void DispatchRafAlignedInput(base::TimeTicks frame_time); | 93 void DispatchRafAlignedInput(base::TimeTicks frame_time); |
93 void QueueClosure(const base::Closure& closure); | 94 void QueueClosure(const base::Closure& closure); |
94 | 95 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 151 |
151 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 152 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
152 blink::scheduler::RendererScheduler* renderer_scheduler_; | 153 blink::scheduler::RendererScheduler* renderer_scheduler_; |
153 | 154 |
154 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); | 155 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); |
155 }; | 156 }; |
156 | 157 |
157 } // namespace content | 158 } // namespace content |
158 | 159 |
159 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ | 160 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ |
OLD | NEW |