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

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

Issue 2226633002: Add a feature to display a persistence toggle for permission prompts on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix null error Created 4 years, 4 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/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 c2b44e82fcd2d256e5dc91740d811ecd0caf46c2..18de95858b9b299dd87562d70bdad887e998a628 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
@@ -158,7 +158,17 @@ public abstract class InfoBar implements InfoBarView {
* @param action The type of action defined as ACTION_* in this class.
*/
protected void onButtonClicked(int action) {
- if (mNativeInfoBarPtr != 0) nativeOnButtonClicked(mNativeInfoBarPtr, action);
+ if (mNativeInfoBarPtr != 0) nativeOnButtonClicked(mNativeInfoBarPtr, action, false);
+ }
+
+ /**
+ * Performs some action related to the button being clicked.
+ * @param action The type of action defined as ACTION_* in this class.
+ * @param persist Whether the user wishes the action to be persisted. Used only for
+ * ConfirmInfoBar.
gone 2016/08/10 17:47:53 From an interface standpoint, I think it might mak
dominickn 2016/08/11 04:43:49 Done, moved to PermissionInfoBar.
+ */
+ protected void onButtonClicked(int action, boolean persist) {
+ if (mNativeInfoBarPtr != 0) nativeOnButtonClicked(mNativeInfoBarPtr, action, persist);
}
@Override
@@ -171,6 +181,7 @@ public abstract class InfoBar implements InfoBarView {
}
private native void nativeOnLinkClicked(long nativeInfoBarAndroid);
- private native void nativeOnButtonClicked(long nativeInfoBarAndroid, int action);
+ private native void nativeOnButtonClicked(
+ long nativeInfoBarAndroid, int action, boolean persist);
private native void nativeOnCloseButtonClicked(long nativeInfoBarAndroid);
}

Powered by Google App Engine
This is Rietveld 408576698