Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(943)

Unified Diff: content/renderer/gpu/input_handler_wrapper.cc

Issue 13844021: Move compositor thread input handling logic into content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/gpu/input_handler_wrapper.h ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..76d487396992f89959f5b0904faa3799568f7e96
--- /dev/null
+++ b/content/renderer/gpu/input_handler_wrapper.cc
@@ -0,0 +1,60 @@
+// 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"
+#include "third_party/WebKit/Source/Platform/chromium/public/Platform.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_proxy_(input_handler.get()),
+ main_loop_(main_loop),
+ render_view_impl_(render_view_impl) {
+ input_handler_proxy_.SetClient(this);
+}
+
+InputHandlerWrapper::~InputHandlerWrapper() {
+ input_handler_proxy_.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& cumulative_scroll) {
+ return WebKit::Platform::current()->createFlingAnimationCurve(
+ deviceSource, velocity, cumulative_scroll);
+}
+
+} // namespace content
« no previous file with comments | « content/renderer/gpu/input_handler_wrapper.h ('k') | content/renderer/gpu/render_widget_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698