| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/common/input/input_event_ack_state.h" | 10 #include "content/common/input/input_event_ack_state.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // To be called whenever the content frame has been updated. | 56 // To be called whenever the content frame has been updated. |
| 57 void OnFrameMetadataUpdated(const cc::CompositorFrameMetadata& metadata); | 57 void OnFrameMetadataUpdated(const cc::CompositorFrameMetadata& metadata); |
| 58 | 58 |
| 59 // Toggle activity of any overscroll effects. When disabled, events will be | 59 // Toggle activity of any overscroll effects. When disabled, events will be |
| 60 // ignored until the controller is re-enabled. | 60 // ignored until the controller is re-enabled. |
| 61 void Enable(); | 61 void Enable(); |
| 62 void Disable(); | 62 void Disable(); |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 // OverscrollGlowClient implementation. | 65 // OverscrollGlowClient implementation. |
| 66 scoped_ptr<ui::EdgeEffectBase> CreateEdgeEffect() override; | 66 std::unique_ptr<ui::EdgeEffectBase> CreateEdgeEffect() override; |
| 67 | 67 |
| 68 void SetNeedsAnimate(); | 68 void SetNeedsAnimate(); |
| 69 | 69 |
| 70 ui::WindowAndroidCompositor* const compositor_; | 70 ui::WindowAndroidCompositor* const compositor_; |
| 71 const float dpi_scale_; | 71 const float dpi_scale_; |
| 72 | 72 |
| 73 bool enabled_; | 73 bool enabled_; |
| 74 | 74 |
| 75 // TODO(jdduke): Factor out a common API from the two overscroll effects. | 75 // TODO(jdduke): Factor out a common API from the two overscroll effects. |
| 76 scoped_ptr<ui::OverscrollGlow> glow_effect_; | 76 std::unique_ptr<ui::OverscrollGlow> glow_effect_; |
| 77 scoped_ptr<ui::OverscrollRefresh> refresh_effect_; | 77 std::unique_ptr<ui::OverscrollRefresh> refresh_effect_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid); | 79 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace content | 82 } // namespace content |
| 83 | 83 |
| 84 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ | 84 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ |
| OLD | NEW |