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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java

Issue 14772036: Let Android port access properly sized images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 7 years, 7 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 | « chrome/android/java/ResourceId.template ('k') | chrome/browser/android/resource_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
index 940596453861ee48a1201c40619844869de6ff51..1592310bf4176ccd53450e7a752958ad0f03dd83 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
@@ -65,10 +65,12 @@ class WebsiteSettingsPopup implements OnClickListener {
/** Adds a section, which contains an icon, a headline, and a description. */
@CalledByNative
- private void addSection(Bitmap icon, String headline, String description) {
+ private void addSection(int enumeratedIconId, String headline, String description) {
View section = LayoutInflater.from(mContext).inflate(R.layout.website_settings, null);
ImageView i = (ImageView) section.findViewById(R.id.website_settings_icon);
- i.setImageBitmap(icon);
+ int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
+ i.setImageResource(drawableId);
+
TextView h = (TextView) section.findViewById(R.id.website_settings_headline);
h.setText(headline);
if (TextUtils.isEmpty(headline)) h.setVisibility(View.GONE);
« no previous file with comments | « chrome/android/java/ResourceId.template ('k') | chrome/browser/android/resource_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698