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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java

Issue 2641783003: (Android) Displaying URL in the popup info without '%'-escaped chars
Patch Set: 2nd patch version Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 import org.chromium.chrome.browser.preferences.PreferencesLauncher; 61 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
62 import org.chromium.chrome.browser.preferences.website.ContentSetting; 62 import org.chromium.chrome.browser.preferences.website.ContentSetting;
63 import org.chromium.chrome.browser.preferences.website.ContentSettingsResources; 63 import org.chromium.chrome.browser.preferences.website.ContentSettingsResources;
64 import org.chromium.chrome.browser.preferences.website.SingleWebsitePreferences; 64 import org.chromium.chrome.browser.preferences.website.SingleWebsitePreferences;
65 import org.chromium.chrome.browser.preferences.website.WebsitePreferenceBridge; 65 import org.chromium.chrome.browser.preferences.website.WebsitePreferenceBridge;
66 import org.chromium.chrome.browser.profiles.Profile; 66 import org.chromium.chrome.browser.profiles.Profile;
67 import org.chromium.chrome.browser.ssl.SecurityStateModel; 67 import org.chromium.chrome.browser.ssl.SecurityStateModel;
68 import org.chromium.chrome.browser.tab.Tab; 68 import org.chromium.chrome.browser.tab.Tab;
69 import org.chromium.chrome.browser.util.UrlUtilities; 69 import org.chromium.chrome.browser.util.UrlUtilities;
70 import org.chromium.components.location.LocationUtils; 70 import org.chromium.components.location.LocationUtils;
71 import org.chromium.components.url_formatter.UrlFormatter;
71 import org.chromium.content.browser.ContentViewCore; 72 import org.chromium.content.browser.ContentViewCore;
72 import org.chromium.content_public.browser.WebContents; 73 import org.chromium.content_public.browser.WebContents;
73 import org.chromium.content_public.browser.WebContentsObserver; 74 import org.chromium.content_public.browser.WebContentsObserver;
74 import org.chromium.ui.base.DeviceFormFactor; 75 import org.chromium.ui.base.DeviceFormFactor;
75 import org.chromium.ui.base.WindowAndroid; 76 import org.chromium.ui.base.WindowAndroid;
76 import org.chromium.ui.base.WindowAndroid.PermissionCallback; 77 import org.chromium.ui.base.WindowAndroid.PermissionCallback;
77 import org.chromium.ui.interpolators.BakedBezierInterpolator; 78 import org.chromium.ui.interpolators.BakedBezierInterpolator;
78 import org.chromium.ui.widget.Toast; 79 import org.chromium.ui.widget.Toast;
79 80
80 import java.lang.annotation.Retention; 81 import java.lang.annotation.Retention;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 380
380 try { 381 try {
381 mParsedUrl = new URI(mFullUrl); 382 mParsedUrl = new URI(mFullUrl);
382 mIsInternalPage = UrlUtilities.isInternalScheme(mParsedUrl); 383 mIsInternalPage = UrlUtilities.isInternalScheme(mParsedUrl);
383 } catch (URISyntaxException e) { 384 } catch (URISyntaxException e) {
384 mParsedUrl = null; 385 mParsedUrl = null;
385 mIsInternalPage = false; 386 mIsInternalPage = false;
386 } 387 }
387 mSecurityLevel = SecurityStateModel.getSecurityLevelForWebContents(mTab. getWebContents()); 388 mSecurityLevel = SecurityStateModel.getSecurityLevelForWebContents(mTab. getWebContents());
388 389
389 SpannableStringBuilder urlBuilder = new SpannableStringBuilder(mFullUrl) ; 390 SpannableStringBuilder urlBuilder =
391 new SpannableStringBuilder(UrlFormatter.formatUrlForDisplay(mFul lUrl));
390 OmniboxUrlEmphasizer.emphasizeUrl(urlBuilder, mContext.getResources(), m Tab.getProfile(), 392 OmniboxUrlEmphasizer.emphasizeUrl(urlBuilder, mContext.getResources(), m Tab.getProfile(),
391 mSecurityLevel, mIsInternalPage, true, true); 393 mSecurityLevel, mIsInternalPage, true, true);
392 mUrlTitle.setText(urlBuilder); 394 mUrlTitle.setText(urlBuilder);
393 395
394 if (mParsedUrl == null || mParsedUrl.getScheme() == null 396 if (mParsedUrl == null || mParsedUrl.getScheme() == null
395 || !(mParsedUrl.getScheme().equals(UrlConstants.HTTP_SCHEME) 397 || !(mParsedUrl.getScheme().equals(UrlConstants.HTTP_SCHEME)
396 || mParsedUrl.getScheme().equals(UrlConstants.HTTPS_S CHEME))) { 398 || mParsedUrl.getScheme().equals(UrlConstants.HTTPS_S CHEME))) {
397 mSiteSettingsButton.setVisibility(View.GONE); 399 mSiteSettingsButton.setVisibility(View.GONE);
398 } 400 }
399 401
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 new WebsiteSettingsPopup(activity, tab, offlinePageCreationDate, content Publisher); 962 new WebsiteSettingsPopup(activity, tab, offlinePageCreationDate, content Publisher);
961 } 963 }
962 964
963 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent s webContents); 965 private static native long nativeInit(WebsiteSettingsPopup popup, WebContent s webContents);
964 966
965 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid); 967 private native void nativeDestroy(long nativeWebsiteSettingsPopupAndroid);
966 968
967 private native void nativeRecordWebsiteSettingsAction( 969 private native void nativeRecordWebsiteSettingsAction(
968 long nativeWebsiteSettingsPopupAndroid, int action); 970 long nativeWebsiteSettingsPopupAndroid, int action);
969 } 971 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698