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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 private: | 68 private: |
69 // OverscrollGlowClient implementation. | 69 // OverscrollGlowClient implementation. |
70 std::unique_ptr<ui::EdgeEffectBase> CreateEdgeEffect() override; | 70 std::unique_ptr<ui::EdgeEffectBase> CreateEdgeEffect() override; |
71 | 71 |
72 void SetNeedsAnimate(); | 72 void SetNeedsAnimate(); |
73 | 73 |
74 ui::WindowAndroidCompositor* const compositor_; | 74 ui::WindowAndroidCompositor* const compositor_; |
75 const float dpi_scale_; | 75 const float dpi_scale_; |
76 | 76 |
77 bool enabled_; | 77 bool enabled_; |
| 78 bool scroll_update_consumed_; |
78 | 79 |
79 // TODO(jdduke): Factor out a common API from the two overscroll effects. | 80 // TODO(jdduke): Factor out a common API from the two overscroll effects. |
80 std::unique_ptr<ui::OverscrollGlow> glow_effect_; | 81 std::unique_ptr<ui::OverscrollGlow> glow_effect_; |
81 std::unique_ptr<ui::OverscrollRefresh> refresh_effect_; | 82 std::unique_ptr<ui::OverscrollRefresh> refresh_effect_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid); | 84 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid); |
84 }; | 85 }; |
85 | 86 |
86 } // namespace content | 87 } // namespace content |
87 | 88 |
88 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ | 89 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ |
OLD | NEW |