| 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" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
| 13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
| 14 #include "cc/input/input_handler.h" | 14 #include "cc/input/input_handler.h" |
| 15 #include "content/common/input/web_input_event_traits.h" | 15 #include "content/common/input/web_input_event_traits.h" |
| 16 #include "content/renderer/input/input_event_filter.h" | 16 #include "content/renderer/input/input_event_filter.h" |
| 17 #include "content/renderer/input/input_handler_manager_client.h" | 17 #include "content/renderer/input/input_handler_manager_client.h" |
| 18 #include "content/renderer/input/input_handler_wrapper.h" | 18 #include "content/renderer/input/input_handler_wrapper.h" |
| 19 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" | 19 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" |
| 20 #include "ui/events/blink/did_overscroll_params.h" |
| 20 #include "ui/events/blink/input_handler_proxy.h" | 21 #include "ui/events/blink/input_handler_proxy.h" |
| 21 | 22 |
| 22 using blink::WebInputEvent; | 23 using blink::WebInputEvent; |
| 23 using ui::InputHandlerProxy; | 24 using ui::InputHandlerProxy; |
| 24 using blink::scheduler::RendererScheduler; | 25 using blink::scheduler::RendererScheduler; |
| 25 | 26 |
| 26 namespace content { | 27 namespace content { |
| 27 | 28 |
| 28 namespace { | 29 namespace { |
| 29 | 30 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 *input_event, | 225 *input_event, |
| 225 RendererScheduler::InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); | 226 RendererScheduler::InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); |
| 226 break; | 227 break; |
| 227 default: | 228 default: |
| 228 break; | 229 break; |
| 229 } | 230 } |
| 230 return input_event_ack_state; | 231 return input_event_ack_state; |
| 231 } | 232 } |
| 232 | 233 |
| 233 void InputHandlerManager::DidOverscroll(int routing_id, | 234 void InputHandlerManager::DidOverscroll(int routing_id, |
| 234 const DidOverscrollParams& params) { | 235 const ui::DidOverscrollParams& params) { |
| 235 client_->DidOverscroll(routing_id, params); | 236 client_->DidOverscroll(routing_id, params); |
| 236 } | 237 } |
| 237 | 238 |
| 238 void InputHandlerManager::DidStartFlinging(int routing_id) { | 239 void InputHandlerManager::DidStartFlinging(int routing_id) { |
| 239 client_->DidStartFlinging(routing_id); | 240 client_->DidStartFlinging(routing_id); |
| 240 } | 241 } |
| 241 | 242 |
| 242 void InputHandlerManager::DidStopFlinging(int routing_id) { | 243 void InputHandlerManager::DidStopFlinging(int routing_id) { |
| 243 client_->DidStopFlinging(routing_id); | 244 client_->DidStopFlinging(routing_id); |
| 244 } | 245 } |
| 245 | 246 |
| 246 void InputHandlerManager::DidAnimateForInput() { | 247 void InputHandlerManager::DidAnimateForInput() { |
| 247 renderer_scheduler_->DidAnimateForInputOnCompositorThread(); | 248 renderer_scheduler_->DidAnimateForInputOnCompositorThread(); |
| 248 } | 249 } |
| 249 | 250 |
| 250 } // namespace content | 251 } // namespace content |
| OLD | NEW |