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

Unified Diff: ui/base/android/system_ui_resource.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
Index: ui/base/android/system_ui_resource.h
diff --git a/ui/base/android/system_ui_resource.h b/ui/base/android/system_ui_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b2dcff9053b34a7d1493f1f90aca7ef287c4b2f
--- /dev/null
+++ b/ui/base/android/system_ui_resource.h
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_H_
+#define UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_H_
+
+#include "cc/resources/ui_resource_client.h"
+#include "ui/base/ui_base_export.h"
+
+namespace ui {
+
+class UI_BASE_EXPORT SystemUIResourceClient {
+ public:
+ virtual void OnUIResourceIdChanged() = 0;
+ virtual ~SystemUIResourceClient() {}
+};
+
+class UI_BASE_EXPORT SystemUIResource {
+ public:
+ enum Type { OVERSCROLL_EDGE, OVERSCROLL_GLOW };
+
+ virtual cc::UIResourceId id() = 0;
jdduke (slow) 2014/07/12 01:01:09 Do you anticipate having multiple implementations
powei 2014/07/16 17:10:52 Done. Moved SystemUIResource to content
+ virtual void Load() = 0;
+ virtual void SetClient(SystemUIResourceClient* client) = 0;
+
+ virtual ~SystemUIResource() {}
+};
+
+} // namespace ui
+
+#endif // UI_BASE_ANDROID_SYSTEM_UI_RESOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698