OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/input/input_handler_manager.h" | 5 #include "content/renderer/input/input_handler_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 TRACE_EVENT1("input,rail", "InputHandlerManager::HandleInputEvent", | 224 TRACE_EVENT1("input,rail", "InputHandlerManager::HandleInputEvent", |
225 "result", "EventSentToInputHandlerProxy"); | 225 "result", "EventSentToInputHandlerProxy"); |
226 InputHandlerProxy* proxy = it->second->input_handler_proxy(); | 226 InputHandlerProxy* proxy = it->second->input_handler_proxy(); |
227 proxy->HandleInputEventWithLatencyInfo( | 227 proxy->HandleInputEventWithLatencyInfo( |
228 std::move(input_event), latency_info, | 228 std::move(input_event), latency_info, |
229 base::Bind(&InputHandlerManager::DidHandleInputEventAndOverscroll, | 229 base::Bind(&InputHandlerManager::DidHandleInputEventAndOverscroll, |
230 weak_ptr_factory_.GetWeakPtr(), callback)); | 230 weak_ptr_factory_.GetWeakPtr(), callback)); |
231 } | 231 } |
232 | 232 |
| 233 void InputHandlerManager::QueueClosureForMainThreadEventQueue( |
| 234 int routing_id, |
| 235 const base::Closure& closure) { |
| 236 client_->QueueClosureForMainThreadEventQueue(routing_id, closure); |
| 237 } |
| 238 |
233 void InputHandlerManager::DidHandleInputEventAndOverscroll( | 239 void InputHandlerManager::DidHandleInputEventAndOverscroll( |
234 const InputEventAckStateCallback& callback, | 240 const InputEventAckStateCallback& callback, |
235 InputHandlerProxy::EventDisposition event_disposition, | 241 InputHandlerProxy::EventDisposition event_disposition, |
236 ui::WebScopedInputEvent input_event, | 242 ui::WebScopedInputEvent input_event, |
237 const ui::LatencyInfo& latency_info, | 243 const ui::LatencyInfo& latency_info, |
238 std::unique_ptr<ui::DidOverscrollParams> overscroll_params) { | 244 std::unique_ptr<ui::DidOverscrollParams> overscroll_params) { |
239 InputEventAckState input_event_ack_state = | 245 InputEventAckState input_event_ack_state = |
240 InputEventDispositionToAck(event_disposition); | 246 InputEventDispositionToAck(event_disposition); |
241 switch (input_event_ack_state) { | 247 switch (input_event_ack_state) { |
242 case INPUT_EVENT_ACK_STATE_CONSUMED: | 248 case INPUT_EVENT_ACK_STATE_CONSUMED: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 void InputHandlerManager::DispatchNonBlockingEventToMainThread( | 287 void InputHandlerManager::DispatchNonBlockingEventToMainThread( |
282 int routing_id, | 288 int routing_id, |
283 ui::WebScopedInputEvent event, | 289 ui::WebScopedInputEvent event, |
284 const ui::LatencyInfo& latency_info) { | 290 const ui::LatencyInfo& latency_info) { |
285 DCHECK(task_runner_->BelongsToCurrentThread()); | 291 DCHECK(task_runner_->BelongsToCurrentThread()); |
286 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event), | 292 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event), |
287 latency_info); | 293 latency_info); |
288 } | 294 } |
289 | 295 |
290 } // namespace content | 296 } // namespace content |
OLD | NEW |