Index: content/renderer/gpu/input_handler_wrapper.h |
diff --git a/content/renderer/gpu/input_handler_wrapper.h b/content/renderer/gpu/input_handler_wrapper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f9d405df2357d52467cd198e15c0fa42f9fe6307 |
--- /dev/null |
+++ b/content/renderer/gpu/input_handler_wrapper.h |
@@ -0,0 +1,58 @@ |
+// 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. |
+ |
+#ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ |
+#define CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
+#include "content/renderer/gpu/input_handler_client_impl.h" |
+#include "content/renderer/gpu/input_handler_client_impl_client.h" |
+#include "content/renderer/gpu/input_handler_manager.h" |
+ |
+namespace content { |
+ |
+class InputHandlerWrapper |
danakj
2013/05/01 19:20:43
Hmm or is this the InputHandlerProxy. Or the Input
|
+ : public InputHandlerClientImplClient, |
+ public base::RefCountedThreadSafe<InputHandlerWrapper> { |
+ public: |
+ 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); |
+ |
+ int routing_id() const { return routing_id_; } |
+ InputHandlerClientImpl* input_handler() const { return input_handler_.get(); } |
+ |
+ // InputHandlerClientImplClient implementation. |
+ virtual void willShutdown() OVERRIDE; |
+ virtual void didHandleInputEvent() OVERRIDE; |
+ virtual void didNotHandleInputEvent(bool send_to_widget) OVERRIDE; |
+ virtual void transferActiveWheelFlingAnimation( |
+ const WebKit::WebActiveWheelFlingParameters& params) OVERRIDE; |
+ virtual WebKit::WebGestureCurve* createFlingAnimationCurve( |
+ int deviceSource, |
+ const WebKit::WebFloatPoint& velocity, |
+ const WebKit::WebSize& cumulativeScroll) OVERRIDE; |
+ |
+ private: |
+ friend class base::RefCountedThreadSafe<InputHandlerWrapper>; |
+ |
+ virtual ~InputHandlerWrapper(); |
+ |
+ InputHandlerManager* input_handler_manager_; |
+ int routing_id_; |
+ scoped_ptr<InputHandlerClientImpl> input_handler_; |
+ scoped_refptr<base::MessageLoopProxy> main_loop_; |
+ |
+ // Can only be accessed on the main thread. |
+ base::WeakPtr<RenderViewImpl> render_view_impl_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ |