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_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_H_ |
6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_H_ | 6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "cc/input/input_handler.h" | 11 #include "cc/input/input_handler.h" |
| 12 #include "cc/input/layer_scroll_offset_delegate.h" |
12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurve.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurve.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurveTarg
et.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurveTarg
et.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebActiveWheelFlingPa
rameters.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebActiveWheelFlingPa
rameters.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 | 20 |
20 class InputHandlerProxyClient; | 21 class InputHandlerProxyClient; |
21 | 22 |
22 // This class is a proxy between the content input event filtering and the | 23 // This class is a proxy between the content input event filtering and the |
23 // compositor's input handling logic. InputHandlerProxy instances live entirely | 24 // compositor's input handling logic. InputHandlerProxy instances live entirely |
24 // on the compositor thread. Each InputHandler instance handles input events | 25 // on the compositor thread. Each InputHandler instance handles input events |
25 // intended for a specific WebWidget. | 26 // intended for a specific WebWidget. |
26 class CONTENT_EXPORT InputHandlerProxy | 27 class CONTENT_EXPORT InputHandlerProxy |
27 : public cc::InputHandlerClient, | 28 : public cc::InputHandlerClient, |
28 public NON_EXPORTED_BASE(WebKit::WebGestureCurveTarget) { | 29 public NON_EXPORTED_BASE(WebKit::WebGestureCurveTarget) { |
29 public: | 30 public: |
30 explicit InputHandlerProxy(cc::InputHandler* input_handler); | 31 explicit InputHandlerProxy(cc::InputHandler* input_handler); |
31 virtual ~InputHandlerProxy(); | 32 virtual ~InputHandlerProxy(); |
32 | 33 |
33 void SetClient(InputHandlerProxyClient* client); | 34 void SetClient(InputHandlerProxyClient* client); |
| 35 void SetRootLayerScrollOffsetDelegate( |
| 36 cc::LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate); |
34 void HandleInputEvent(const WebKit::WebInputEvent& event); | 37 void HandleInputEvent(const WebKit::WebInputEvent& event); |
35 | 38 |
36 // cc::InputHandlerClient implementation. | 39 // cc::InputHandlerClient implementation. |
37 virtual void WillShutdown() OVERRIDE; | 40 virtual void WillShutdown() OVERRIDE; |
38 virtual void Animate(base::TimeTicks time) OVERRIDE; | 41 virtual void Animate(base::TimeTicks time) OVERRIDE; |
39 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 42 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
40 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, | 43 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, |
41 gfx::Vector2dF current_fling_velocity) OVERRIDE; | 44 gfx::Vector2dF current_fling_velocity) OVERRIDE; |
42 | 45 |
43 // WebKit::WebGestureCurveTarget implementation. | 46 // WebKit::WebGestureCurveTarget implementation. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // conservative in the sense that we might not be actually flinging when it is | 88 // conservative in the sense that we might not be actually flinging when it is |
86 // true. | 89 // true. |
87 bool fling_may_be_active_on_main_thread_; | 90 bool fling_may_be_active_on_main_thread_; |
88 | 91 |
89 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 92 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
90 }; | 93 }; |
91 | 94 |
92 } // namespace content | 95 } // namespace content |
93 | 96 |
94 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_H_ | 97 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_H_ |
OLD | NEW |