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/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "cc/input/input_handler.h" | 12 #include "cc/input/input_handler.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "third_party/WebKit/public/platform/WebGestureCurve.h" | 14 #include "third_party/WebKit/public/platform/WebGestureCurve.h" |
15 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" | 15 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" |
16 #include "third_party/WebKit/public/web/WebActiveWheelFlingParameters.h" | 16 #include "third_party/WebKit/public/web/WebActiveWheelFlingParameters.h" |
17 #include "third_party/WebKit/public/web/WebInputEvent.h" | 17 #include "third_party/WebKit/public/web/WebInputEvent.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 class InputHandlerProxyClient; | 21 class InputHandlerProxyClient; |
| 22 class InputScrollElasticityController; |
22 | 23 |
23 // This class is a proxy between the content input event filtering and the | 24 // This class is a proxy between the content input event filtering and the |
24 // compositor's input handling logic. InputHandlerProxy instances live entirely | 25 // compositor's input handling logic. InputHandlerProxy instances live entirely |
25 // on the compositor thread. Each InputHandler instance handles input events | 26 // on the compositor thread. Each InputHandler instance handles input events |
26 // intended for a specific WebWidget. | 27 // intended for a specific WebWidget. |
27 class CONTENT_EXPORT InputHandlerProxy | 28 class CONTENT_EXPORT InputHandlerProxy |
28 : public cc::InputHandlerClient, | 29 : public cc::InputHandlerClient, |
29 public NON_EXPORTED_BASE(blink::WebGestureCurveTarget) { | 30 public NON_EXPORTED_BASE(blink::WebGestureCurveTarget) { |
30 public: | 31 public: |
31 InputHandlerProxy(cc::InputHandler* input_handler, | 32 InputHandlerProxy(cc::InputHandler* input_handler, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 bool disallow_horizontal_fling_scroll_; | 128 bool disallow_horizontal_fling_scroll_; |
128 bool disallow_vertical_fling_scroll_; | 129 bool disallow_vertical_fling_scroll_; |
129 | 130 |
130 // Whether an active fling has seen an |Animate()| call. This is useful for | 131 // Whether an active fling has seen an |Animate()| call. This is useful for |
131 // determining if the fling start time should be re-initialized. | 132 // determining if the fling start time should be re-initialized. |
132 bool has_fling_animation_started_; | 133 bool has_fling_animation_started_; |
133 | 134 |
134 // Non-zero only within the scope of |scrollBy|. | 135 // Non-zero only within the scope of |scrollBy|. |
135 gfx::Vector2dF current_fling_velocity_; | 136 gfx::Vector2dF current_fling_velocity_; |
136 | 137 |
| 138 // Used to animate rubber-band over-scroll effect on Mac. |
| 139 scoped_ptr<InputScrollElasticityController> scroll_elasticity_controller_; |
| 140 |
137 bool smooth_scroll_enabled_; | 141 bool smooth_scroll_enabled_; |
138 | 142 |
139 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 143 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
140 }; | 144 }; |
141 | 145 |
142 } // namespace content | 146 } // namespace content |
143 | 147 |
144 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ | 148 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ |
OLD | NEW |