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

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

Issue 516703002: Replaced the current WebsiteSettings dialog with a new PageInfo dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed changes to chromium_strings Created 6 years, 2 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/WebsiteSettingsPopupLegacy.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java b/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopupLegacy.java
similarity index 91%
copy from chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
copy to chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopupLegacy.java
index 92d07f3db426d388d728ebcf27e1d0e3fe78cae1..729ed315b75aa440c55c0802b5c688646b1b3055 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopupLegacy.java
@@ -33,7 +33,7 @@ import java.net.URISyntaxException;
/**
* Java side of Android implementation of the website settings UI.
*/
-public class WebsiteSettingsPopup implements OnClickListener {
+public class WebsiteSettingsPopupLegacy implements OnClickListener {
private static final String HELP_URL =
"http://www.google.com/support/chrome/bin/answer.py?answer=95617";
private static final int DESCRIPTION_TEXT_SIZE_SP = 12;
@@ -42,13 +42,13 @@ public class WebsiteSettingsPopup implements OnClickListener {
private final LinearLayout mContainer;
private final WebContents mWebContents;
private final int mPaddingWide, mPaddingThin;
- private final long mNativeWebsiteSettingsPopup;
+ private final long mNativeWebsiteSettingsPopupLegacy;
private TextView mCertificateViewer, mMoreInfoLink;
private ViewGroup mCertificateLayout, mDescriptionLayout;
private Button mResetCertDecisionsButton;
private String mLinkUrl;
- private WebsiteSettingsPopup(Context context, WebContents webContents) {
+ private WebsiteSettingsPopupLegacy(Context context, WebContents webContents) {
mContext = context;
mWebContents = webContents;
@@ -66,7 +66,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
mDialog.setCanceledOnTouchOutside(true);
// This needs to come after other member initialization.
- mNativeWebsiteSettingsPopup = nativeInit(this, webContents);
+ mNativeWebsiteSettingsPopupLegacy = nativeInit(this, webContents);
final WebContentsObserverAndroid webContentsObserver =
new WebContentsObserverAndroid(mWebContents) {
@Override
@@ -79,9 +79,9 @@ public class WebsiteSettingsPopup implements OnClickListener {
mDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
- assert mNativeWebsiteSettingsPopup != 0;
+ assert mNativeWebsiteSettingsPopupLegacy != 0;
webContentsObserver.detachFromWebContents();
- nativeDestroy(mNativeWebsiteSettingsPopup);
+ nativeDestroy(mNativeWebsiteSettingsPopupLegacy);
}
});
}
@@ -113,7 +113,8 @@ public class WebsiteSettingsPopup implements OnClickListener {
}
private View addSection(int enumeratedIconId, String headline, String description) {
- View section = LayoutInflater.from(mContext).inflate(R.layout.website_settings, null);
+ View section = LayoutInflater.from(mContext).inflate(R.layout.website_settings_legacy,
+ null);
ImageView i = (ImageView) section.findViewById(R.id.website_settings_icon);
int drawableId = ResourceId.mapToDrawableId(enumeratedIconId);
i.setImageResource(drawableId);
@@ -145,7 +146,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
@CalledByNative
private void addResetCertDecisionsButton(String label) {
- assert mNativeWebsiteSettingsPopup != 0;
+ assert mNativeWebsiteSettingsPopupLegacy != 0;
assert mResetCertDecisionsButton == null;
mResetCertDecisionsButton = new Button(mContext);
@@ -184,7 +185,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
mDescriptionLayout.addView(mMoreInfoLink);
}
- /** Displays the WebsiteSettingsPopup. */
+ /** Displays the WebsiteSettingsPopupLegacy. */
@CalledByNative
private void showDialog() {
ScrollView scrollView = new ScrollView(mContext);
@@ -199,7 +200,7 @@ public class WebsiteSettingsPopup implements OnClickListener {
public void onClick(View v) {
mDialog.dismiss();
if (mResetCertDecisionsButton == v) {
- nativeResetCertDecisions(mNativeWebsiteSettingsPopup, mWebContents);
+ nativeResetCertDecisions(mNativeWebsiteSettingsPopupLegacy, mWebContents);
} else if (mCertificateViewer == v) {
byte[][] certChain = nativeGetCertificateChain(mWebContents);
if (certChain == null) {
@@ -232,12 +233,13 @@ public class WebsiteSettingsPopup implements OnClickListener {
*/
@SuppressWarnings("unused")
public static void show(Context context, WebContents webContents) {
- new WebsiteSettingsPopup(context, webContents);
+ new WebsiteSettingsPopupLegacy(context, webContents);
}
- private static native long nativeInit(WebsiteSettingsPopup popup, WebContents webContents);
- private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid);
+ private static native long nativeInit(WebsiteSettingsPopupLegacy popup,
+ WebContents webContents);
+ private native void nativeDestroy(long nativeWebsiteSettingsPopupLegacyAndroid);
private native void nativeResetCertDecisions(
- long nativeWebsiteSettingsPopupAndroid, WebContents webContents);
+ long nativeWebsiteSettingsPopupLegacyAndroid, WebContents webContents);
private native byte[][] nativeGetCertificateChain(WebContents webContents);
}

Powered by Google App Engine
This is Rietveld 408576698