Chromium Code Reviews| Index: content/renderer/gpu/input_handler_wrapper.cc |
| diff --git a/content/renderer/gpu/input_handler_wrapper.cc b/content/renderer/gpu/input_handler_wrapper.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..de2746a3cee17ea27149c4527788619db1d38556 |
| --- /dev/null |
| +++ b/content/renderer/gpu/input_handler_wrapper.cc |
| @@ -0,0 +1,56 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/renderer/gpu/input_handler_wrapper.h" |
| + |
| +#include "content/renderer/gpu/input_event_filter.h" |
| +#include "content/renderer/gpu/input_handler_manager.h" |
| + |
| +namespace content { |
| + |
| +InputHandlerWrapper::InputHandlerWrapper( |
| + InputHandlerManager* input_handler_manager, |
| + int routing_id, |
| + const scoped_refptr<base::MessageLoopProxy>& main_loop, |
| + const base::WeakPtr<cc::InputHandler>& input_handler, |
| + const base::WeakPtr<RenderViewImpl>& render_view_impl) |
| + : input_handler_manager_(input_handler_manager), |
| + routing_id_(routing_id), |
| + input_handler_(new InputHandlerClientImpl(input_handler.get())), |
| + main_loop_(main_loop), |
| + render_view_impl_(render_view_impl) { |
| + input_handler_->SetClient(this); |
| +} |
| + |
| +InputHandlerWrapper::~InputHandlerWrapper() { input_handler_->SetClient(NULL); } |
| + |
| +void InputHandlerWrapper::transferActiveWheelFlingAnimation( |
| + const WebKit::WebActiveWheelFlingParameters& params) { |
| + main_loop_->PostTask( |
| + FROM_HERE, |
| + base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, |
| + render_view_impl_, |
| + params)); |
| +} |
| + |
| +void InputHandlerWrapper::willShutdown() { |
| + input_handler_manager_->RemoveInputHandler(routing_id_); |
| +} |
| + |
| +void InputHandlerWrapper::didHandleInputEvent() { |
| + input_handler_manager_->filter()->DidHandleInputEvent(); |
| +} |
| + |
| +void InputHandlerWrapper::didNotHandleInputEvent(bool send_to_widget) { |
| + input_handler_manager_->filter()->DidNotHandleInputEvent(send_to_widget); |
| +} |
| + |
| +WebKit::WebGestureCurve* InputHandlerWrapper::createFlingAnimationCurve( |
| + int deviceSource, |
| + const WebKit::WebFloatPoint& velocity, |
| + const WebKit::WebSize& cumulativeScroll) { |
| + return NULL; |
|
danakj
2013/05/01 19:20:43
why's this so? Can the function just go away then
|
| +} |
| + |
| +} // namespace content |