Chromium Code Reviews| 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); |
| } |