| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.animation.Animator; | 7 import android.animation.Animator; |
| 8 import android.animation.AnimatorListenerAdapter; | 8 import android.animation.AnimatorListenerAdapter; |
| 9 import android.animation.AnimatorSet; | 9 import android.animation.AnimatorSet; |
| 10 import android.animation.ObjectAnimator; | 10 import android.animation.ObjectAnimator; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 import org.chromium.chrome.browser.preferences.PreferencesLauncher; | 56 import org.chromium.chrome.browser.preferences.PreferencesLauncher; |
| 57 import org.chromium.chrome.browser.preferences.website.ContentSetting; | 57 import org.chromium.chrome.browser.preferences.website.ContentSetting; |
| 58 import org.chromium.chrome.browser.preferences.website.ContentSettingsResources; | 58 import org.chromium.chrome.browser.preferences.website.ContentSettingsResources; |
| 59 import org.chromium.chrome.browser.preferences.website.SingleWebsitePreferences; | 59 import org.chromium.chrome.browser.preferences.website.SingleWebsitePreferences; |
| 60 import org.chromium.chrome.browser.profiles.Profile; | 60 import org.chromium.chrome.browser.profiles.Profile; |
| 61 import org.chromium.chrome.browser.ssl.SecurityStateModel; | 61 import org.chromium.chrome.browser.ssl.SecurityStateModel; |
| 62 import org.chromium.chrome.browser.tab.Tab; | 62 import org.chromium.chrome.browser.tab.Tab; |
| 63 import org.chromium.chrome.browser.util.UrlUtilities; | 63 import org.chromium.chrome.browser.util.UrlUtilities; |
| 64 import org.chromium.components.location.LocationUtils; | 64 import org.chromium.components.location.LocationUtils; |
| 65 import org.chromium.components.security_state.ConnectionSecurityLevel; | 65 import org.chromium.components.security_state.ConnectionSecurityLevel; |
| 66 import org.chromium.components.url_formatter.UrlFormatter; |
| 66 import org.chromium.content.browser.ContentViewCore; | 67 import org.chromium.content.browser.ContentViewCore; |
| 67 import org.chromium.content_public.browser.WebContents; | 68 import org.chromium.content_public.browser.WebContents; |
| 68 import org.chromium.content_public.browser.WebContentsObserver; | 69 import org.chromium.content_public.browser.WebContentsObserver; |
| 69 import org.chromium.ui.base.DeviceFormFactor; | 70 import org.chromium.ui.base.DeviceFormFactor; |
| 70 import org.chromium.ui.base.WindowAndroid; | 71 import org.chromium.ui.base.WindowAndroid; |
| 71 import org.chromium.ui.base.WindowAndroid.PermissionCallback; | 72 import org.chromium.ui.base.WindowAndroid.PermissionCallback; |
| 72 import org.chromium.ui.interpolators.BakedBezierInterpolator; | 73 import org.chromium.ui.interpolators.BakedBezierInterpolator; |
| 73 import org.chromium.ui.widget.Toast; | 74 import org.chromium.ui.widget.Toast; |
| 74 | 75 |
| 75 import java.lang.annotation.Retention; | 76 import java.lang.annotation.Retention; |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 mOfflinePageCreationDate)); | 551 mOfflinePageCreationDate)); |
| 551 } else if (mSecurityLevel != ConnectionSecurityLevel.SECURITY_ERROR | 552 } else if (mSecurityLevel != ConnectionSecurityLevel.SECURITY_ERROR |
| 552 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_WARNING | 553 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_WARNING |
| 553 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_POLICY_WAR
NING) { | 554 && mSecurityLevel != ConnectionSecurityLevel.SECURITY_POLICY_WAR
NING) { |
| 554 messageBuilder.append( | 555 messageBuilder.append( |
| 555 mContext.getString(getConnectionMessageId(mSecurityLevel, mI
sInternalPage))); | 556 mContext.getString(getConnectionMessageId(mSecurityLevel, mI
sInternalPage))); |
| 556 } else { | 557 } else { |
| 557 String originToDisplay; | 558 String originToDisplay; |
| 558 try { | 559 try { |
| 559 URI parsedUrl = new URI(mFullUrl); | 560 URI parsedUrl = new URI(mFullUrl); |
| 560 originToDisplay = UrlUtilities.formatUrlForSecurityDisplay(parse
dUrl, false); | 561 originToDisplay = UrlFormatter.formatUrlForSecurityDisplay(parse
dUrl, false); |
| 561 } catch (URISyntaxException e) { | 562 } catch (URISyntaxException e) { |
| 562 // The URL is invalid - just display the full URL. | 563 // The URL is invalid - just display the full URL. |
| 563 originToDisplay = mFullUrl; | 564 originToDisplay = mFullUrl; |
| 564 } | 565 } |
| 565 | 566 |
| 566 messageBuilder.append( | 567 messageBuilder.append( |
| 567 mContext.getString(R.string.page_info_connection_broken, ori
ginToDisplay)); | 568 mContext.getString(R.string.page_info_connection_broken, ori
ginToDisplay)); |
| 568 } | 569 } |
| 569 | 570 |
| 570 if (isConnectionDetailsLinkVisible()) { | 571 if (isConnectionDetailsLinkVisible()) { |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 offlinePageOriginalUrl, offlinePageCreationDate, contentPublishe
r); | 946 offlinePageOriginalUrl, offlinePageCreationDate, contentPublishe
r); |
| 946 } | 947 } |
| 947 | 948 |
| 948 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent
s webContents); | 949 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent
s webContents); |
| 949 | 950 |
| 950 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); | 951 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); |
| 951 | 952 |
| 952 private native void nativeRecordWebsiteSettingsAction( | 953 private native void nativeRecordWebsiteSettingsAction( |
| 953 long nativeWebsiteSettingsPopupAndroid, int action); | 954 long nativeWebsiteSettingsPopupAndroid, int action); |
| 954 } | 955 } |
| OLD | NEW |