Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
index 36f4aad81109d2ea261e4391e4f5db214c19991c..be4d3d35ea24ef70c7dc9b9c95d74c3d93f6671d 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBar.java |
@@ -5,6 +5,7 @@ |
package org.chromium.chrome.browser.infobar; |
import android.content.Context; |
+import android.graphics.Bitmap; |
import android.view.View; |
import org.chromium.base.CalledByNative; |
@@ -36,6 +37,7 @@ public abstract class InfoBar implements InfoBarView { |
public static final int ACTION_TYPE_TRANSLATE_SHOW_ORIGINAL = 4; |
private final int mIconDrawableId; |
+ private final Bitmap mIconBitmap; |
private final CharSequence mMessage; |
private InfoBarListeners.Dismiss mListener; |
@@ -64,10 +66,12 @@ public abstract class InfoBar implements InfoBarView { |
* @param iconDrawableId ID of the resource to use for the Icon. If 0, no icon will be shown. |
* @param message The message to show in the infobar. |
*/ |
- public InfoBar(InfoBarListeners.Dismiss listener, int iconDrawableId, CharSequence message) { |
+ public InfoBar(InfoBarListeners.Dismiss listener, int iconDrawableId, Bitmap iconBitmap, |
+ CharSequence message) { |
mListener = listener; |
mId = generateId(); |
mIconDrawableId = iconDrawableId; |
+ mIconBitmap = iconBitmap; |
mMessage = message; |
mExpireOnNavigation = true; |
} |
@@ -145,7 +149,8 @@ public abstract class InfoBar implements InfoBarView { |
protected final View createView() { |
assert mContext != null; |
- InfoBarLayout layout = new InfoBarLayout(mContext, this, mIconDrawableId, mMessage); |
+ InfoBarLayout layout = |
+ new InfoBarLayout(mContext, this, mIconDrawableId, mIconBitmap, mMessage); |
createContent(layout); |
return layout; |
} |