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

Unified Diff: content/browser/android/edge_effect.h

Issue 377013002: android: Use UIResource for overscroll glow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments. moved resource loading to its own class. Created 6 years, 5 months 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 | « no previous file | content/browser/android/edge_effect.cc » ('j') | content/browser/android/overscroll_glow.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/edge_effect.h
diff --git a/content/browser/android/edge_effect.h b/content/browser/android/edge_effect.h
index b8febba22d2a77673be3198c46b4e6d26cc39c21..be2680b154d498e77f88cacfe6bc78d0281681fb 100644
--- a/content/browser/android/edge_effect.h
+++ b/content/browser/android/edge_effect.h
@@ -6,16 +6,14 @@
#define CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_
#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "ui/gfx/size_f.h"
-namespace cc {
-class Layer;
-}
-
namespace content {
+class OverscrollGlowLayerWrapper;
+
/* |EdgeEffect| mirrors its Android counterpart, EdgeEffect.java.
* The primary difference is ownership; the Android version manages render
* resources directly, while this version simply applies the effect to
@@ -33,7 +31,8 @@ public:
EDGE_COUNT
};
- EdgeEffect(scoped_refptr<cc::Layer> edge, scoped_refptr<cc::Layer> glow);
+ EdgeEffect(scoped_ptr<OverscrollGlowLayerWrapper> edge,
+ scoped_ptr<OverscrollGlowLayerWrapper> glow);
~EdgeEffect();
void Pull(base::TimeTicks current_time, float delta_distance);
@@ -60,8 +59,8 @@ private:
STATE_PULL_DECAY
};
- scoped_refptr<cc::Layer> edge_;
- scoped_refptr<cc::Layer> glow_;
+ scoped_ptr<OverscrollGlowLayerWrapper> edge_;
+ scoped_ptr<OverscrollGlowLayerWrapper> glow_;
float edge_alpha_;
float edge_scale_y_;
« no previous file with comments | « no previous file | content/browser/android/edge_effect.cc » ('j') | content/browser/android/overscroll_glow.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698