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

Unified Diff: ui/base/android/window_android.h

Issue 377013002: android: Use UIResource for overscroll glow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: ui/base/android/window_android.h
diff --git a/ui/base/android/window_android.h b/ui/base/android/window_android.h
index cd8ae3408c85f2677e2f8472a7357c4e0f9d3012..94f3dd789b92f34fdd693b97f69721704191d828 100644
--- a/ui/base/android/window_android.h
+++ b/ui/base/android/window_android.h
@@ -9,19 +9,27 @@
#include <vector>
#include "base/android/jni_weak_ref.h"
#include "base/android/scoped_java_ref.h"
+#include "base/containers/scoped_ptr_hash_map.h"
#include "base/observer_list.h"
#include "base/time/time.h"
+#include "cc/resources/ui_resource_client.h"
#include "ui/base/ui_base_export.h"
#include "ui/gfx/vector2d_f.h"
namespace ui {
+class UIResourceClientAndroid;
class WindowAndroidCompositor;
class WindowAndroidObserver;
// Android implementation of the activity window.
class UI_BASE_EXPORT WindowAndroid {
public:
+ enum SystemUIResource {
+ OVERSCROLL_EDGE,
+ OVERSCROLL_GLOW
+ };
+
WindowAndroid(JNIEnv* env, jobject obj, jlong vsync_period);
void Destroy(JNIEnv* env, jobject obj);
@@ -56,6 +64,11 @@ class UI_BASE_EXPORT WindowAndroid {
void OnVSync(JNIEnv* env, jobject obj, jlong time_micros);
void Animate(base::TimeTicks begin_frame_time);
+ void InitializeSystemUIResource(SystemUIResource system_resource,
powei 2014/07/08 19:12:43 having this feels a little awkward, but since ui d
jdduke (slow) 2014/07/08 20:10:11 Hmm, who is responsible for calling this now for t
powei 2014/07/12 00:24:46 Done. Moved resource loading to system_ui_resource
+ scoped_ptr<UIResourceClientAndroid> resource);
+
+ cc::UIResourceId GetSystemUIResource(SystemUIResource system_resource);
jdduke (slow) 2014/07/08 20:10:11 Is it worth making this method const?
jdduke (slow) 2014/07/08 20:42:08 This pull and push model makes synchronization som
powei 2014/07/09 20:41:03 A subscriber model sounds good. Although it would
jdduke (slow) 2014/07/09 21:12:13 Are there any downsides? I'm thinking perhaps we p
powei 2014/07/09 23:43:14 So we'll need another interface like ui::SystemUIR
+
private:
~WindowAndroid();
@@ -66,6 +79,9 @@ class UI_BASE_EXPORT WindowAndroid {
ObserverList<WindowAndroidObserver> observer_list_;
+ typedef base::ScopedPtrHashMap<int, UIResourceClientAndroid> UIResourceMap;
+ UIResourceMap ui_resource_map_;
+
DISALLOW_COPY_AND_ASSIGN(WindowAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698