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

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

Issue 1164973003: Add initial support for runtime permissions in android M. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Appease findbugs Created 5 years, 6 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/infobar/ConfirmInfoBarDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBarDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBarDelegate.java
index d5d0ad165b7074e6c0f646aa03a91c1d31203641..d82b81c73b82dc1a62ce7ed8713330d549fd58ff 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBarDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ConfirmInfoBarDelegate.java
@@ -8,6 +8,7 @@ import android.graphics.Bitmap;
import org.chromium.base.CalledByNative;
import org.chromium.chrome.browser.ResourceId;
+import org.chromium.ui.base.WindowAndroid;
/**
* Provides JNI methods for ConfirmInfoBars
@@ -24,22 +25,28 @@ public class ConfirmInfoBarDelegate {
/**
* Creates and begins the process for showing a ConfirmInfoBar.
+ * @param windowAndroid The owning window for the infobar.
* @param enumeratedIconId ID corresponding to the icon that will be shown for the InfoBar.
* The ID must have been mapped using the ResourceMapper class before
* passing it to this function.
- * @param iconBitmap Bitmap to use if there is no equivalent Java resource for enumeratedIconId.
+ * @param iconBitmap Bitmap to use if there is no equivalent Java resource for
+ * enumeratedIconId.
* @param message Message to display to the user indicating what the InfoBar is for.
* @param linkText Link text to display in addition to the message.
* @param buttonOk String to display on the OK button.
* @param buttonCancel String to display on the Cancel button.
+ * @param contentSettings The list of ContentSettingTypes being requested by this infobar.
*/
@CalledByNative
- InfoBar showConfirmInfoBar(int enumeratedIconId, Bitmap iconBitmap, String message,
- String linkText, String buttonOk, String buttonCancel) {
+ InfoBar showConfirmInfoBar(WindowAndroid windowAndroid, int enumeratedIconId,
+ Bitmap iconBitmap, String message, String linkText, String buttonOk,
+ String buttonCancel, int[] contentSettings) {
int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
ConfirmInfoBar infoBar = new ConfirmInfoBar(
null, drawableId, iconBitmap, message, linkText, buttonOk, buttonCancel);
+ infoBar.setContentSettings(windowAndroid, contentSettings);
+
return infoBar;
}
}

Powered by Google App Engine
This is Rietveld 408576698