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

Unified Diff: content/browser/android/overscroll_glow.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/overscroll_glow.h
diff --git a/content/browser/android/overscroll_glow.h b/content/browser/android/overscroll_glow.h
index 0a555d41b7af8ac39c87889b4d36099bca796680..507e1eefe6413f167c24e7658ba416597017f1af 100644
--- a/content/browser/android/overscroll_glow.h
+++ b/content/browser/android/overscroll_glow.h
@@ -18,6 +18,10 @@ namespace cc {
class Layer;
}
+namespace ui {
+class SystemUIResourceManager;
+}
+
namespace content {
/* |OverscrollGlow| mirrors its Android counterpart, OverscrollGlow.java.
@@ -26,11 +30,11 @@ namespace content {
*/
class OverscrollGlow {
public:
- // Create a new effect. If |enabled| is false, the effect will remain
- // deactivated until explicitly enabled.
- // Note: No resources will be allocated until the effect is both
- // enabled and an overscroll event has occurred.
- static scoped_ptr<OverscrollGlow> Create(bool enabled);
+ // Create a new effect. |resource_manager| provides the resource for the
+ // effect. |resource_manager| must outlive the effect. If |enabled| is false,
+ // the effect will remain deactivated until explicitly enabled.
+ static scoped_ptr<OverscrollGlow> Create(
+ ui::SystemUIResourceManager* resource_manager);
~OverscrollGlow();
@@ -70,7 +74,7 @@ class OverscrollGlow {
private:
enum Axis { AXIS_X, AXIS_Y };
- OverscrollGlow(bool enabled);
+ OverscrollGlow(ui::SystemUIResourceManager* resource_manager);
// Returns whether the effect is initialized.
bool InitializeIfNecessary();
@@ -94,6 +98,7 @@ class OverscrollGlow {
bool initialized_;
scoped_refptr<cc::Layer> root_layer_;
+ ui::SystemUIResourceManager* resource_manager_;
DISALLOW_COPY_AND_ASSIGN(OverscrollGlow);
};

Powered by Google App Engine
This is Rietveld 408576698