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

Unified Diff: ui/android/java/src/org/chromium/ui/resources/Resource.java

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
Index: ui/android/java/src/org/chromium/ui/resources/Resource.java
diff --git a/ui/android/java/src/org/chromium/ui/resources/Resource.java b/ui/android/java/src/org/chromium/ui/resources/Resource.java
index 5884a88b04693d7208afbfdbf80ee8891a9ff282..3d2a524f2b8d819be4b2767216c57e1a690a3466 100644
--- a/ui/android/java/src/org/chromium/ui/resources/Resource.java
+++ b/ui/android/java/src/org/chromium/ui/resources/Resource.java
@@ -7,6 +7,8 @@ package org.chromium.ui.resources;
import android.graphics.Bitmap;
import android.graphics.Rect;
+import org.chromium.ui.resources.statics.NinePatchData;
+
/**
* A basic resource interface that all assets must use to be exposed to the CC layer as
* UIResourceIds.
@@ -24,15 +26,16 @@ public interface Resource {
Rect getBitmapSize();
/**
- * @return The padded content area of this resource. For 9-patches this will represent the
- * valid content of the 9-patch. It can mean other things for other Resources though.
+ * Returns the nine patch data if the resource is backed by a nine patch bitmap. In all other
+ * cases, this will be null.
+ * @return The nine patch data for the bitmap or null.
*/
- Rect getPadding();
+ NinePatchData getNinePatchData();
/**
- * @return The aperture of this resource. For 9-patches this will represent the area of the
- * {@link Bitmap} that should not be stretched. It can mean other things for other
- * Resources though.
+ * Creates the native representation of this Resource. Note that the ownership is passed to the
+ * caller.
+ * @return The pointer to the native Resource.
*/
- Rect getAperture();
+ long createNativeResource();
}

Powered by Google App Engine
This is Rietveld 408576698