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

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

Issue 454863003: Revert of [Android] Use UIResource for overscroll glow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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') | no next file with comments »
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 a8f944c67acada5c73225bd9fd3e3f35120573d2..b8febba22d2a77673be3198c46b4e6d26cc39c21 100644
--- a/content/browser/android/edge_effect.h
+++ b/content/browser/android/edge_effect.h
@@ -6,16 +6,12 @@
#define CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_
#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "ui/gfx/size_f.h"
namespace cc {
class Layer;
-}
-
-namespace ui {
-class SystemUIResourceManager;
}
namespace content {
@@ -28,7 +24,7 @@
* All coordinates and dimensions are in device pixels.
*/
class EdgeEffect {
- public:
+public:
enum Edge {
EDGE_TOP = 0,
EDGE_LEFT,
@@ -37,7 +33,7 @@
EDGE_COUNT
};
- explicit EdgeEffect(ui::SystemUIResourceManager* resource_manager);
+ EdgeEffect(scoped_refptr<cc::Layer> edge, scoped_refptr<cc::Layer> glow);
~EdgeEffect();
void Pull(base::TimeTicks current_time, float delta_distance);
@@ -54,11 +50,8 @@
float glow_height,
float offset);
- void SetParent(cc::Layer* parent);
+private:
- static void PreloadResources(ui::SystemUIResourceManager* resource_manager);
-
- private:
enum State {
STATE_IDLE = 0,
STATE_PULL,
@@ -67,9 +60,8 @@
STATE_PULL_DECAY
};
- class EffectLayer;
- scoped_ptr<EffectLayer> edge_;
- scoped_ptr<EffectLayer> glow_;
+ scoped_refptr<cc::Layer> edge_;
+ scoped_refptr<cc::Layer> glow_;
float edge_alpha_;
float edge_scale_y_;
« no previous file with comments | « no previous file | content/browser/android/edge_effect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698