OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_INPUT_INPUT_HANDLER_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ |
6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ | 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/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 "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "third_party/WebKit/public/platform/WebGestureCurve.h" | 13 #include "third_party/WebKit/public/platform/WebGestureCurve.h" |
14 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" | 14 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" |
15 #include "third_party/WebKit/public/web/WebActiveWheelFlingParameters.h" | 15 #include "third_party/WebKit/public/web/WebActiveWheelFlingParameters.h" |
16 #include "third_party/WebKit/public/web/WebInputEvent.h" | 16 #include "third_party/WebKit/public/web/WebInputEvent.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class InputHandlerProxyClient; | 20 class InputHandlerProxyClient; |
| 21 class InputScrollElasticityController; |
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(blink::WebGestureCurveTarget) { | 29 public NON_EXPORTED_BASE(blink::WebGestureCurveTarget) { |
29 public: | 30 public: |
30 InputHandlerProxy(cc::InputHandler* input_handler, | 31 InputHandlerProxy(cc::InputHandler* input_handler, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 115 |
115 // Whether an active fling has seen an |Animate()| call. This is useful for | 116 // Whether an active fling has seen an |Animate()| call. This is useful for |
116 // determining if the fling start time should be re-initialized. | 117 // determining if the fling start time should be re-initialized. |
117 bool has_fling_animation_started_; | 118 bool has_fling_animation_started_; |
118 | 119 |
119 // Non-zero only within the scope of |scrollBy|. | 120 // Non-zero only within the scope of |scrollBy|. |
120 gfx::Vector2dF current_fling_velocity_; | 121 gfx::Vector2dF current_fling_velocity_; |
121 | 122 |
122 bool smooth_scroll_enabled_; | 123 bool smooth_scroll_enabled_; |
123 | 124 |
| 125 scoped_ptr<InputScrollElasticityController> scroll_elasticity_controller_; |
| 126 |
124 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 127 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
125 }; | 128 }; |
126 | 129 |
127 } // namespace content | 130 } // namespace content |
128 | 131 |
129 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ | 132 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ |
OLD | NEW |