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

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 system_ui_resource* implementation to content 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
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..62498e095ed22903f9a6488fb13849f6eb09309a 100644
--- a/content/browser/android/edge_effect.h
+++ b/content/browser/android/edge_effect.h
@@ -6,7 +6,7 @@
#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"
@@ -24,7 +24,14 @@ namespace content {
* All coordinates and dimensions are in device pixels.
*/
class EdgeEffect {
-public:
+ public:
+ // A wrapper class over the cc::Layer.
+ class LayerWrapper {
+ public:
+ virtual cc::Layer* layer() = 0;
+ virtual ~LayerWrapper() {}
+ };
+
enum Edge {
EDGE_TOP = 0,
EDGE_LEFT,
@@ -33,7 +40,7 @@ public:
EDGE_COUNT
};
- EdgeEffect(scoped_refptr<cc::Layer> edge, scoped_refptr<cc::Layer> glow);
+ EdgeEffect(scoped_ptr<LayerWrapper> edge, scoped_ptr<LayerWrapper> glow);
~EdgeEffect();
void Pull(base::TimeTicks current_time, float delta_distance);
@@ -60,8 +67,8 @@ private:
STATE_PULL_DECAY
};
- scoped_refptr<cc::Layer> edge_;
- scoped_refptr<cc::Layer> glow_;
+ scoped_ptr<LayerWrapper> edge_;
+ scoped_ptr<LayerWrapper> 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/system_ui_resource_manager_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698