Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: content/browser/android/edge_effect_l.cc

Issue 679493002: [Android] Add a native pull-to-refresh overscroll effect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix findbugs... Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/android/edge_effect.cc ('k') | content/browser/android/overscroll_controller_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/edge_effect_l.cc
diff --git a/content/browser/android/edge_effect_l.cc b/content/browser/android/edge_effect_l.cc
index ccec8a41c47217acde500f6973eb71088cf78ae2..173e3044ca3e7e7f3d3908e94c38be61ec210d9d 100644
--- a/content/browser/android/edge_effect_l.cc
+++ b/content/browser/android/edge_effect_l.cc
@@ -5,6 +5,7 @@
#include "content/browser/android/edge_effect_l.h"
#include "cc/layers/ui_resource_layer.h"
+#include "content/browser/android/animation_utils.h"
#include "ui/base/android/system_ui_resource_manager.h"
namespace content {
@@ -40,29 +41,7 @@ const float kPullDistanceAlphaGlowFactor = 0.8f;
const int kVelocityGlowFactor = 6;
-const ui::SystemUIResourceManager::ResourceType kResourceType =
- ui::SystemUIResourceManager::OVERSCROLL_GLOW_L;
-
-template <typename T>
-T Lerp(T a, T b, T t) {
- return a + (b - a) * t;
-}
-
-template <typename T>
-T Clamp(T value, T low, T high) {
- return value < low ? low : (value > high ? high : value);
-}
-
-template <typename T>
-T Damp(T input, T factor) {
- T result;
- if (factor == 1) {
- result = 1 - (1 - input) * (1 - input);
- } else {
- result = 1 - std::pow(1 - input, 2 * factor);
- }
- return result;
-}
+const ui::SystemUIResourceType kResourceType = ui::OVERSCROLL_GLOW_L;
} // namespace
« no previous file with comments | « content/browser/android/edge_effect.cc ('k') | content/browser/android/overscroll_controller_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698