| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 std::unique_ptr<ui::DidOverscrollParams> overscroll_params) { | 238 std::unique_ptr<ui::DidOverscrollParams> overscroll_params) { |
| 239 InputEventAckState input_event_ack_state = | 239 InputEventAckState input_event_ack_state = |
| 240 InputEventDispositionToAck(event_disposition); | 240 InputEventDispositionToAck(event_disposition); |
| 241 switch (input_event_ack_state) { | 241 switch (input_event_ack_state) { |
| 242 case INPUT_EVENT_ACK_STATE_CONSUMED: | 242 case INPUT_EVENT_ACK_STATE_CONSUMED: |
| 243 renderer_scheduler_->DidHandleInputEventOnCompositorThread( | 243 renderer_scheduler_->DidHandleInputEventOnCompositorThread( |
| 244 *input_event, | 244 *input_event, |
| 245 RendererScheduler::InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); | 245 RendererScheduler::InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); |
| 246 break; | 246 break; |
| 247 case INPUT_EVENT_ACK_STATE_NOT_CONSUMED: | 247 case INPUT_EVENT_ACK_STATE_NOT_CONSUMED: |
| 248 case INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING: |
| 248 case INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING_DUE_TO_FLING: | 249 case INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING_DUE_TO_FLING: |
| 249 renderer_scheduler_->DidHandleInputEventOnCompositorThread( | 250 renderer_scheduler_->DidHandleInputEventOnCompositorThread( |
| 250 *input_event, | 251 *input_event, |
| 251 RendererScheduler::InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); | 252 RendererScheduler::InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); |
| 252 break; | 253 break; |
| 253 default: | 254 default: |
| 254 break; | 255 break; |
| 255 } | 256 } |
| 256 callback.Run(input_event_ack_state, std::move(input_event), latency_info, | 257 callback.Run(input_event_ack_state, std::move(input_event), latency_info, |
| 257 std::move(overscroll_params)); | 258 std::move(overscroll_params)); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 281 void InputHandlerManager::DispatchNonBlockingEventToMainThread( | 282 void InputHandlerManager::DispatchNonBlockingEventToMainThread( |
| 282 int routing_id, | 283 int routing_id, |
| 283 ui::WebScopedInputEvent event, | 284 ui::WebScopedInputEvent event, |
| 284 const ui::LatencyInfo& latency_info) { | 285 const ui::LatencyInfo& latency_info) { |
| 285 DCHECK(task_runner_->BelongsToCurrentThread()); | 286 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 286 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event), | 287 client_->DispatchNonBlockingEventToMainThread(routing_id, std::move(event), |
| 287 latency_info); | 288 latency_info); |
| 288 } | 289 } |
| 289 | 290 |
| 290 } // namespace content | 291 } // namespace content |
| OLD | NEW |