| 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" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 }; | 39 }; |
| 40 EventDisposition HandleInputEventWithLatencyInfo( | 40 EventDisposition HandleInputEventWithLatencyInfo( |
| 41 const blink::WebInputEvent& event, | 41 const blink::WebInputEvent& event, |
| 42 ui::LatencyInfo* latency_info); | 42 ui::LatencyInfo* latency_info); |
| 43 EventDisposition HandleInputEvent(const blink::WebInputEvent& event); | 43 EventDisposition HandleInputEvent(const blink::WebInputEvent& event); |
| 44 | 44 |
| 45 // cc::InputHandlerClient implementation. | 45 // cc::InputHandlerClient implementation. |
| 46 virtual void WillShutdown() OVERRIDE; | 46 virtual void WillShutdown() OVERRIDE; |
| 47 virtual void Animate(base::TimeTicks time) OVERRIDE; | 47 virtual void Animate(base::TimeTicks time) OVERRIDE; |
| 48 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 48 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
| 49 virtual void DidOverscroll(const gfx::Vector2dF& accumulated_overscroll, | 49 virtual void DidOverscroll(const cc::DidOverscrollParams& params) OVERRIDE; |
| 50 const gfx::Vector2dF& latest_overscroll_delta) | |
| 51 OVERRIDE; | |
| 52 | 50 |
| 53 // blink::WebGestureCurveTarget implementation. | 51 // blink::WebGestureCurveTarget implementation. |
| 54 virtual bool scrollBy(const blink::WebFloatSize& offset, | 52 virtual void scrollBy(const blink::WebFloatSize& offset); |
| 55 const blink::WebFloatSize& velocity); | 53 virtual void notifyCurrentFlingVelocity(const blink::WebFloatSize& velocity); |
| 56 | 54 |
| 57 bool gesture_scroll_on_impl_thread_for_testing() const { | 55 bool gesture_scroll_on_impl_thread_for_testing() const { |
| 58 return gesture_scroll_on_impl_thread_; | 56 return gesture_scroll_on_impl_thread_; |
| 59 } | 57 } |
| 60 | 58 |
| 61 private: | 59 private: |
| 62 EventDisposition HandleGestureFling(const blink::WebGestureEvent& event); | 60 EventDisposition HandleGestureFling(const blink::WebGestureEvent& event); |
| 63 | 61 |
| 64 // Returns true if we scrolled by the increment. | 62 // Returns true if we scrolled by the increment. |
| 65 bool TouchpadFlingScroll(const blink::WebFloatSize& increment); | 63 bool TouchpadFlingScroll(const blink::WebFloatSize& increment); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 83 // This is always false when there are no flings on the main thread, but | 81 // This is always false when there are no flings on the main thread, but |
| 84 // conservative in the sense that we might not be actually flinging when it is | 82 // conservative in the sense that we might not be actually flinging when it is |
| 85 // true. | 83 // true. |
| 86 bool fling_may_be_active_on_main_thread_; | 84 bool fling_may_be_active_on_main_thread_; |
| 87 // The axes on which the current fling is allowed to scroll. If a given fling | 85 // The axes on which the current fling is allowed to scroll. If a given fling |
| 88 // has overscrolled on a particular axis, further fling scrolls on that axis | 86 // has overscrolled on a particular axis, further fling scrolls on that axis |
| 89 // will be disabled. | 87 // will be disabled. |
| 90 bool disallow_horizontal_fling_scroll_; | 88 bool disallow_horizontal_fling_scroll_; |
| 91 bool disallow_vertical_fling_scroll_; | 89 bool disallow_vertical_fling_scroll_; |
| 92 | 90 |
| 93 // Non-zero only within the scope of |scrollBy|. | |
| 94 gfx::Vector2dF current_fling_velocity_; | |
| 95 | |
| 96 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); | 91 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); |
| 97 }; | 92 }; |
| 98 | 93 |
| 99 } // namespace content | 94 } // namespace content |
| 100 | 95 |
| 101 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ | 96 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ |
| OLD | NEW |