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

Unified Diff: ui/android/resources/resource_manager.h

Issue 2746483003: ui/android: Fix Resource meta-data sharing with ResourceManager. (Closed)
Patch Set: jni Created 3 years, 9 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 | « ui/android/resources/resource_factory.cc ('k') | ui/android/resources/resource_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/resources/resource_manager.h
diff --git a/ui/android/resources/resource_manager.h b/ui/android/resources/resource_manager.h
index 41de3a0905ab9c92410a56e9a527146b8c6d103a..c80a543e213d0473ddf189d0ee9c3413efd795b1 100644
--- a/ui/android/resources/resource_manager.h
+++ b/ui/android/resources/resource_manager.h
@@ -13,10 +13,8 @@
#include "cc/resources/scoped_ui_resource.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/android/resources/crushed_sprite_resource.h"
+#include "ui/android/resources/resource.h"
#include "ui/android/ui_android_export.h"
-#include "ui/gfx/geometry/insets_f.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/geometry/size.h"
namespace ui {
@@ -38,20 +36,6 @@ enum AndroidResourceType {
// APIs and consumed by the compositor.
class UI_ANDROID_EXPORT ResourceManager {
public:
- struct Resource {
- public:
- Resource();
- ~Resource();
- gfx::Rect Border(const gfx::Size& bounds) const;
- gfx::Rect Border(const gfx::Size& bounds, const gfx::InsetsF& scale) const;
- size_t EstimateMemoryUsage() const;
-
- std::unique_ptr<cc::ScopedUIResource> ui_resource;
- gfx::Size size;
- gfx::Rect padding;
- gfx::Rect aperture;
- };
-
// Obtain a handle to the Java ResourceManager counterpart.
virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
@@ -87,7 +71,8 @@ class UI_ANDROID_EXPORT ResourceManager {
// Convenience wrapper method.
cc::UIResourceId GetUIResourceId(AndroidResourceType res_type, int res_id) {
Resource* resource = GetResource(res_type, res_id);
- return resource && resource->ui_resource ? resource->ui_resource->id() : 0;
+ return resource && resource->ui_resource() ? resource->ui_resource()->id()
+ : 0;
}
protected:
« no previous file with comments | « ui/android/resources/resource_factory.cc ('k') | ui/android/resources/resource_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698