| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ | 6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "content/browser/android/overscroll_glow.h" | 9 #include "content/browser/android/overscroll_glow.h" |
| 10 #include "content/browser/android/overscroll_refresh.h" | 10 #include "content/browser/android/overscroll_refresh.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Glue class for handling all inputs into Android-specific overscroll effects, | 32 // Glue class for handling all inputs into Android-specific overscroll effects, |
| 33 // both the passive overscroll glow and the active overscroll pull-to-refresh. | 33 // both the passive overscroll glow and the active overscroll pull-to-refresh. |
| 34 // Note that all input coordinates (both for events and overscroll) are in DIPs. | 34 // Note that all input coordinates (both for events and overscroll) are in DIPs. |
| 35 class OverscrollControllerAndroid : public OverscrollGlowClient, | 35 class OverscrollControllerAndroid : public OverscrollGlowClient, |
| 36 public OverscrollRefreshClient, | 36 public OverscrollRefreshClient, |
| 37 public WebContentsObserver { | 37 public WebContentsObserver { |
| 38 public: | 38 public: |
| 39 OverscrollControllerAndroid(WebContents* web_contents, | 39 OverscrollControllerAndroid(WebContents* web_contents, |
| 40 ui::WindowAndroidCompositor* compositor, | 40 ui::WindowAndroidCompositor* compositor, |
| 41 float dpi_scale); | 41 float dpi_scale); |
| 42 virtual ~OverscrollControllerAndroid(); | 42 ~OverscrollControllerAndroid() override; |
| 43 | 43 |
| 44 // Returns true if |event| is consumed by an overscroll effect, in which | 44 // Returns true if |event| is consumed by an overscroll effect, in which |
| 45 // case it should cease propagation. | 45 // case it should cease propagation. |
| 46 bool WillHandleGestureEvent(const blink::WebGestureEvent& event); | 46 bool WillHandleGestureEvent(const blink::WebGestureEvent& event); |
| 47 | 47 |
| 48 // To be called upon receipt of a gesture event ack. | 48 // To be called upon receipt of a gesture event ack. |
| 49 void OnGestureEventAck(const blink::WebGestureEvent& event, | 49 void OnGestureEventAck(const blink::WebGestureEvent& event, |
| 50 InputEventAckState ack_result); | 50 InputEventAckState ack_result); |
| 51 | 51 |
| 52 // To be called upon receipt of an overscroll event. | 52 // To be called upon receipt of an overscroll event. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 scoped_ptr<OverscrollRefresh> refresh_effect_; | 89 scoped_ptr<OverscrollRefresh> refresh_effect_; |
| 90 bool triggered_refresh_active_; | 90 bool triggered_refresh_active_; |
| 91 bool is_fullscreen_; | 91 bool is_fullscreen_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid); | 93 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace content | 96 } // namespace content |
| 97 | 97 |
| 98 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ | 98 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ |
| OLD | NEW |