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

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

Issue 2752693003: chrome/android: Update toolbar drawing in native. (Closed)
Patch Set: .. 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/dynamics/ViewResourceAdapter.java
diff --git a/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java b/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
index c9daab1c433d427f9313e791448ba78d846e834a..540e5f843a58e49facfc8daa56b4f09adf4bc2b6 100644
--- a/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
+++ b/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java
@@ -25,8 +25,6 @@ import org.chromium.ui.resources.statics.NinePatchData;
public class ViewResourceAdapter implements DynamicResource, OnLayoutChangeListener {
private final View mView;
private final Rect mDirtyRect = new Rect();
- private final Rect mContentPadding = new Rect();
- private final Rect mContentAperture = new Rect();
private Bitmap mBitmap;
private Rect mBitmapSize = new Rect();
@@ -75,17 +73,16 @@ public class ViewResourceAdapter implements DynamicResource, OnLayoutChangeListe
return mBitmapSize;
}
+ /**
+ * Override this method to create the native resource type for the generated bitmap.
+ */
@Override
public long createNativeResource() {
- // TODO(khushalsagar): Fix this to create the correct native resource type.
- // See crbug.com/700454.
- computeContentPadding(mContentPadding);
- computeContentAperture(mContentAperture);
- return ResourceFactory.createNinePatchBitmapResource(mContentPadding, mContentAperture);
+ return ResourceFactory.createBitmapResource(null);
}
@Override
- public NinePatchData getNinePatchData() {
+ public final NinePatchData getNinePatchData() {
return null;
}
@@ -150,22 +147,6 @@ public class ViewResourceAdapter implements DynamicResource, OnLayoutChangeListe
}
/**
- * Gives overriding classes the chance to specify a different content padding.
- * @param outContentPadding The resulting content padding.
- */
- protected void computeContentPadding(Rect outContentPadding) {
- outContentPadding.set(0, 0, mView.getWidth(), mView.getHeight());
- }
-
- /**
- * Gives overriding classes the chance to specify a different content aperture.
- * @param outContentAperture The resulting content aperture.
- */
- protected void computeContentAperture(Rect outContentAperture) {
- outContentAperture.set(0, 0, mView.getWidth(), mView.getHeight());
- }
-
- /**
* @return Whether |mBitmap| is corresponding to |mView| or not.
*/
private boolean validateBitmap() {
« no previous file with comments | « ui/android/java/src/org/chromium/ui/resources/ResourceFactory.java ('k') | ui/android/resources/nine_patch_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698