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

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: Created 7 years, 8 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
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

Powered by Google App Engine
This is Rietveld 408576698