| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 if (!input_handler) | 97 if (!input_handler) |
| 98 return; | 98 return; |
| 99 | 99 |
| 100 // The same handler may be registered for a route multiple times. | 100 // The same handler may be registered for a route multiple times. |
| 101 if (input_handlers_.count(routing_id) != 0) | 101 if (input_handlers_.count(routing_id) != 0) |
| 102 return; | 102 return; |
| 103 | 103 |
| 104 TRACE_EVENT1("input", | 104 TRACE_EVENT1("input", |
| 105 "InputHandlerManager::AddInputHandlerOnCompositorThread", | 105 "InputHandlerManager::AddInputHandlerOnCompositorThread", |
| 106 "result", "AddingRoute"); | 106 "result", "AddingRoute"); |
| 107 scoped_ptr<InputHandlerWrapper> wrapper(new InputHandlerWrapper( | 107 std::unique_ptr<InputHandlerWrapper> wrapper(new InputHandlerWrapper( |
| 108 this, routing_id, main_task_runner, input_handler, render_view_impl, | 108 this, routing_id, main_task_runner, input_handler, render_view_impl, |
| 109 enable_smooth_scrolling, enable_wheel_gestures)); | 109 enable_smooth_scrolling, enable_wheel_gestures)); |
| 110 client_->DidAddInputHandler(routing_id); | 110 client_->DidAddInputHandler(routing_id); |
| 111 if (synchronous_handler_proxy_client_) { | 111 if (synchronous_handler_proxy_client_) { |
| 112 synchronous_handler_proxy_client_->DidAddSynchronousHandlerProxy( | 112 synchronous_handler_proxy_client_->DidAddSynchronousHandlerProxy( |
| 113 routing_id, wrapper->input_handler_proxy()); | 113 routing_id, wrapper->input_handler_proxy()); |
| 114 } | 114 } |
| 115 input_handlers_.add(routing_id, std::move(wrapper)); | 115 input_handlers_.add(routing_id, std::move(wrapper)); |
| 116 } | 116 } |
| 117 | 117 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 247 |
| 248 void InputHandlerManager::DidStopFlinging(int routing_id) { | 248 void InputHandlerManager::DidStopFlinging(int routing_id) { |
| 249 client_->DidStopFlinging(routing_id); | 249 client_->DidStopFlinging(routing_id); |
| 250 } | 250 } |
| 251 | 251 |
| 252 void InputHandlerManager::DidAnimateForInput() { | 252 void InputHandlerManager::DidAnimateForInput() { |
| 253 renderer_scheduler_->DidAnimateForInputOnCompositorThread(); | 253 renderer_scheduler_->DidAnimateForInputOnCompositorThread(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 } // namespace content | 256 } // namespace content |
| OLD | NEW |