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

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

Issue 418133012: Add button to page info to revoke user certificate decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits from pkasting and rsesek Created 6 years, 5 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 51b32a8063f2e74aecc403b96b645764bd06932e..16c9b02220c39d27431a85e523d4f9268dface7b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
@@ -42,7 +42,9 @@ public class WebsiteSettingsPopup implements OnClickListener {
private final int mPaddingWide, mPaddingThin;
private TextView mCertificateViewer, mMoreInfoLink;
private ViewGroup mCertificateLayout, mDescriptionLayout;
+ private TextView mResetCertDecisions;
private String mLinkUrl;
+ private final long mNativeWebsiteSettingsPopup;
Ted C 2014/07/28 20:15:49 I would move this up with the other final fields.
jww 2014/08/06 00:51:47 Done.
private WebsiteSettingsPopup(Context context, WebContents webContents) {
mContext = context;
@@ -62,7 +64,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mDialog.setCanceledOnTouchOutside(true);
// This needs to come after other member initialization.
- final long nativeWebsiteSettingsPopup = nativeInit(this, webContents);
+ mNativeWebsiteSettingsPopup = nativeInit(this, webContents);
final WebContentsObserverAndroid webContentsObserver =
new WebContentsObserverAndroid(mWebContents) {
@Override
@@ -75,9 +77,9 @@ public class WebsiteSettingsPopup implements OnClickListener {
mDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
- assert nativeWebsiteSettingsPopup != 0;
+ assert mNativeWebsiteSettingsPopup != 0;
webContentsObserver.detachFromWebContents();
- nativeDestroy(nativeWebsiteSettingsPopup);
+ nativeDestroy(mNativeWebsiteSettingsPopup);
}
});
}
@@ -140,6 +142,20 @@ public class WebsiteSettingsPopup implements OnClickListener {
}
@CalledByNative
+ private void addResetCertDecisionsButton(String label) {
+ assert mNativeWebsiteSettingsPopup != 0;
+ assert mResetCertDecisions == null;
+ mResetCertDecisions = new TextView(mContext);
+ mResetCertDecisions.setText(label);
+ mResetCertDecisions.setTextColor(
+ mContext.getResources().getColor(R.color.website_settings_popup_text_link));
+ mResetCertDecisions.setTextSize(DESCRIPTION_TEXT_SIZE_SP);
+ mResetCertDecisions.setOnClickListener(this);
+ mResetCertDecisions.setPadding(0, 0, 0, mPaddingWide);
+ mCertificateLayout.addView(mResetCertDecisions);
Ted C 2014/07/28 20:15:50 I find it kind of odd that this is a text view tha
jww 2014/08/06 00:51:47 As per pkasting's comment, I've changed these all
+ }
+
+ @CalledByNative
private void addMoreInfoLink(String linkText) {
addUrl(linkText, HELP_URL);
}
@@ -186,6 +202,8 @@ public class WebsiteSettingsPopup implements OnClickListener {
i.putExtra(Browser.EXTRA_APPLICATION_ID, mContext.getPackageName());
mContext.startActivity(i);
} catch (URISyntaxException ex) {}
+ } else if (mResetCertDecisions == v) {
+ nativeResetCertDecisions(mNativeWebsiteSettingsPopup, mWebContents);
Ted C 2014/07/28 20:15:49 +2 indent since you're in java land
jww 2014/08/06 00:51:47 Done.
}
}
@@ -206,5 +224,6 @@ public class WebsiteSettingsPopup implements OnClickListener {
private static native long nativeInit(WebsiteSettingsPopup popup, WebContents webContents);
private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid);
+ private native void nativeResetCertDecisions(long nativeWebsiteSettingsPopupAndroid, WebContents webContents);
Ted C 2014/07/28 20:15:49 line length limit in java is 100, so you need to w
jww 2014/08/06 00:51:47 Done.
private native byte[][] nativeGetCertificateChain(WebContents webContents);
-}
+}
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | chrome/browser/ui/android/website_settings_popup_android.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698