| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.pageinfo; | 5 package org.chromium.chrome.browser.pageinfo; |
| 6 | 6 |
| 7 import android.app.Dialog; | 7 import android.app.Dialog; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.content.DialogInterface; | 9 import android.content.DialogInterface; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 ViewGroup.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.W
RAP_CONTENT); | 200 ViewGroup.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.W
RAP_CONTENT); |
| 201 mDialog.show(); | 201 mDialog.show(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 @Override | 204 @Override |
| 205 public void onClick(View v) { | 205 public void onClick(View v) { |
| 206 if (mResetCertDecisionsButton == v) { | 206 if (mResetCertDecisionsButton == v) { |
| 207 nativeResetCertDecisions(mNativeConnectionInfoPopup, mWebContents); | 207 nativeResetCertDecisions(mNativeConnectionInfoPopup, mWebContents); |
| 208 mDialog.dismiss(); | 208 mDialog.dismiss(); |
| 209 } else if (mCertificateViewer == v) { | 209 } else if (mCertificateViewer == v) { |
| 210 byte[][] certChain = nativeGetCertificateChain(mWebContents); | 210 byte[][] certChain = CertificateChainHelper.getCertificateChain(mWeb
Contents); |
| 211 if (certChain == null) { | 211 if (certChain == null) { |
| 212 // The WebContents may have been destroyed/invalidated. If so, | 212 // The WebContents may have been destroyed/invalidated. If so, |
| 213 // ignore this request. | 213 // ignore this request. |
| 214 return; | 214 return; |
| 215 } | 215 } |
| 216 CertificateViewer.showCertificateChain(mContext, certChain); | 216 CertificateViewer.showCertificateChain(mContext, certChain); |
| 217 } else if (mMoreInfoLink == v) { | 217 } else if (mMoreInfoLink == v) { |
| 218 mDialog.dismiss(); | 218 mDialog.dismiss(); |
| 219 try { | 219 try { |
| 220 Intent i = Intent.parseUri(mLinkUrl, Intent.URI_INTENT_SCHEME); | 220 Intent i = Intent.parseUri(mLinkUrl, Intent.URI_INTENT_SCHEME); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 240 */ | 240 */ |
| 241 public static void show(Context context, WebContents webContents) { | 241 public static void show(Context context, WebContents webContents) { |
| 242 new ConnectionInfoPopup(context, webContents); | 242 new ConnectionInfoPopup(context, webContents); |
| 243 } | 243 } |
| 244 | 244 |
| 245 private static native long nativeInit(ConnectionInfoPopup popup, | 245 private static native long nativeInit(ConnectionInfoPopup popup, |
| 246 WebContents webContents); | 246 WebContents webContents); |
| 247 private native void nativeDestroy(long nativeConnectionInfoPopupAndroid); | 247 private native void nativeDestroy(long nativeConnectionInfoPopupAndroid); |
| 248 private native void nativeResetCertDecisions( | 248 private native void nativeResetCertDecisions( |
| 249 long nativeConnectionInfoPopupAndroid, WebContents webContents); | 249 long nativeConnectionInfoPopupAndroid, WebContents webContents); |
| 250 private native byte[][] nativeGetCertificateChain(WebContents webContents); | |
| 251 } | 250 } |
| OLD | NEW |