| 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" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // WebKit::WebGestureCurveTarget implementation. | 50 // WebKit::WebGestureCurveTarget implementation. |
| 51 virtual void scrollBy(const WebKit::WebFloatSize& offset); | 51 virtual void scrollBy(const WebKit::WebFloatSize& offset); |
| 52 virtual void notifyCurrentFlingVelocity(const WebKit::WebFloatSize& velocity); | 52 virtual void notifyCurrentFlingVelocity(const WebKit::WebFloatSize& velocity); |
| 53 | 53 |
| 54 bool gesture_scroll_on_impl_thread_for_testing() const { | 54 bool gesture_scroll_on_impl_thread_for_testing() const { |
| 55 return gesture_scroll_on_impl_thread_; | 55 return gesture_scroll_on_impl_thread_; |
| 56 } | 56 } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 // This function processes the input event and determines the disposition, but | |
| 60 // does not make any calls out to the InputHandlerProxyClient. Some input | |
| 61 // types defer to helpers. | |
| 62 EventDisposition HandleInputEventInternal(const WebKit::WebInputEvent& event); | |
| 63 | |
| 64 EventDisposition HandleGestureFling(const WebKit::WebGestureEvent& event); | 59 EventDisposition HandleGestureFling(const WebKit::WebGestureEvent& event); |
| 65 | 60 |
| 66 // Returns true if we scrolled by the increment. | 61 // Returns true if we scrolled by the increment. |
| 67 bool TouchpadFlingScroll(const WebKit::WebFloatSize& increment); | 62 bool TouchpadFlingScroll(const WebKit::WebFloatSize& increment); |
| 68 | 63 |
| 69 // Returns true if we actually had an active fling to cancel. | 64 // Returns true if we actually had an active fling to cancel. |
| 70 bool CancelCurrentFling(); | 65 bool CancelCurrentFling(); |
| 71 | 66 |
| 72 scoped_ptr<WebKit::WebGestureCurve> fling_curve_; | 67 scoped_ptr<WebKit::WebGestureCurve> fling_curve_; |
| 73 // Parameters for the active fling animation, stored in case we need to | 68 // Parameters for the active fling animation, stored in case we need to |
| (...skipping 16 matching lines...) Expand all Loading... |
| 90 // The axes on which the current fling has overshot the bounds of the content. | 85 // The axes on which the current fling has overshot the bounds of the content. |
| 91 bool fling_overscrolled_horizontally_; | 86 bool fling_overscrolled_horizontally_; |
| 92 bool fling_overscrolled_vertically_; | 87 bool fling_overscrolled_vertically_; |
| 93 | 88 |
| 94 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 89 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
| 95 }; | 90 }; |
| 96 | 91 |
| 97 } // namespace content | 92 } // namespace content |
| 98 | 93 |
| 99 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_H_ | 94 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_H_ |
| OLD | NEW |