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

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: Removed header guard comment 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
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..3c7e6db019a21c0c06875a5e701f8f35ca4c0690 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) {
Yaron 2013/05/17 22:36:16 Nit: "ID" should be "Id" througout
gone 2013/05/20 18:48:10 Usage in the codebase seems really inconsistent :/
Yaron 2013/05/20 20:54:25 Cases with ID are wrong: http://source.android.com
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);

Powered by Google App Engine
This is Rietveld 408576698