OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ | 5 #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ |
6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ | 6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "content/renderer/gpu/input_handler_manager.h" | 10 #include "content/renderer/gpu/input_handler_manager.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 int routing_id, | 22 int routing_id, |
23 const scoped_refptr<base::MessageLoopProxy>& main_loop, | 23 const scoped_refptr<base::MessageLoopProxy>& main_loop, |
24 const base::WeakPtr<cc::InputHandler>& input_handler, | 24 const base::WeakPtr<cc::InputHandler>& input_handler, |
25 const base::WeakPtr<RenderViewImpl>& render_view_impl); | 25 const base::WeakPtr<RenderViewImpl>& render_view_impl); |
26 | 26 |
27 int routing_id() const { return routing_id_; } | 27 int routing_id() const { return routing_id_; } |
28 InputHandlerProxy* input_handler_proxy() { return &input_handler_proxy_; } | 28 InputHandlerProxy* input_handler_proxy() { return &input_handler_proxy_; } |
29 | 29 |
30 // InputHandlerProxyClient implementation. | 30 // InputHandlerProxyClient implementation. |
31 virtual void WillShutdown() OVERRIDE; | 31 virtual void WillShutdown() OVERRIDE; |
32 virtual void DidHandleInputEvent() OVERRIDE; | |
33 virtual void DidNotHandleInputEvent(bool send_to_widget) OVERRIDE; | |
34 virtual void TransferActiveWheelFlingAnimation( | 32 virtual void TransferActiveWheelFlingAnimation( |
35 const WebKit::WebActiveWheelFlingParameters& params) OVERRIDE; | 33 const WebKit::WebActiveWheelFlingParameters& params) OVERRIDE; |
36 virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve( | 34 virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve( |
37 int deviceSource, | 35 int deviceSource, |
38 const WebKit::WebFloatPoint& velocity, | 36 const WebKit::WebFloatPoint& velocity, |
39 const WebKit::WebSize& cumulativeScroll) OVERRIDE; | 37 const WebKit::WebSize& cumulativeScroll) OVERRIDE; |
40 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, | 38 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, |
41 gfx::Vector2dF current_fling_velocity) OVERRIDE; | 39 gfx::Vector2dF current_fling_velocity) OVERRIDE; |
42 | 40 |
43 private: | 41 private: |
44 friend class base::RefCountedThreadSafe<InputHandlerWrapper>; | 42 friend class base::RefCountedThreadSafe<InputHandlerWrapper>; |
45 | 43 |
46 virtual ~InputHandlerWrapper(); | 44 virtual ~InputHandlerWrapper(); |
47 | 45 |
48 InputHandlerManager* input_handler_manager_; | 46 InputHandlerManager* input_handler_manager_; |
49 int routing_id_; | 47 int routing_id_; |
50 InputHandlerProxy input_handler_proxy_; | 48 InputHandlerProxy input_handler_proxy_; |
51 scoped_refptr<base::MessageLoopProxy> main_loop_; | 49 scoped_refptr<base::MessageLoopProxy> main_loop_; |
52 | 50 |
53 // Can only be accessed on the main thread. | 51 // Can only be accessed on the main thread. |
54 base::WeakPtr<RenderViewImpl> render_view_impl_; | 52 base::WeakPtr<RenderViewImpl> render_view_impl_; |
55 | 53 |
56 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); | 54 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); |
57 }; | 55 }; |
58 | 56 |
59 } // namespace content | 57 } // namespace content |
60 | 58 |
61 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ | 59 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ |
OLD | NEW |