Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| index ebdadbf503f2e5d654450c444144406e93a385fd..4bc0f1647786b548a32e020509108317a37c9e93 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
| @@ -361,40 +361,18 @@ public class ContentViewCore implements MotionEventDelegate { |
| * ensuring the URL passed in is properly formatted (i.e. the scheme has been added if left |
| * off during user input). |
| * |
| - * @param url The url to load. |
| + * @param pararms Parameters for this load. |
| */ |
| - public void loadUrlWithoutUrlSanitization(String url) { |
| - loadUrlWithoutUrlSanitization(url, PAGE_TRANSITION_TYPED); |
| - } |
| - |
| - /** |
| - * Load url without fixing up the url string. Consumers of ContentView are responsible for |
| - * ensuring the URL passed in is properly formatted (i.e. the scheme has been added if left |
| - * off during user input). |
| - * |
| - * @param url The url to load. |
| - * @param pageTransition Page transition id that describes the action that led to this |
| - * navigation. It is important for ranking URLs in the history so the |
| - * omnibox can report suggestions correctly. |
| - */ |
| - public void loadUrlWithoutUrlSanitization(String url, int pageTransition) { |
| - mAccessibilityInjector.addOrRemoveAccessibilityApisIfNecessary(); |
| - if (mNativeContentViewCore != 0) { |
| - if (isPersonalityView()) { |
| - nativeLoadUrlWithoutUrlSanitizationWithUserAgentOverride( |
| - mNativeContentViewCore, |
| - url, |
| - pageTransition, |
| - mContentSettings.getUserAgentString()); |
| - } else { |
| - // Chrome stores overridden UA strings in navigation history |
| - // items, so they stay the same on going back / forward. |
| - nativeLoadUrlWithoutUrlSanitization( |
| - mNativeContentViewCore, |
| - url, |
| - pageTransition); |
| - } |
| - } |
| + public void loadUrl(LoadUrlParams params) { |
| + if (mNativeContentViewCore == 0) return; |
|
Yaron
2012/08/09 21:32:31
Not part of your change, but this seems a little w
boliu
2012/08/10 01:17:19
This check is littered throughout this file. I'm g
Yaron
2012/08/14 01:51:04
Ya.. I think we should try and remove it throughou
joth
2012/08/16 01:26:43
it's for webview compat. Today, you can get away w
|
| + nativeLoadUrl(mNativeContentViewCore, |
| + params.mUrl, |
| + params.mLoadUrlType, |
| + params.mTransitionType, |
| + params.mUaOverrideOption, |
| + params.mPostData, |
| + params.mBaseUrlForDataUrl, |
| + params.mVirtualUrlForDataUrl); |
| } |
| void setAllUserAgentOverridesInHistory() { |
| @@ -1121,11 +1099,15 @@ public class ContentViewCore implements MotionEventDelegate { |
| private static native void nativeDestroy(int nativeContentViewCoreImpl); |
| - private native void nativeLoadUrlWithoutUrlSanitization(int nativeContentViewCoreImpl, |
| - String url, int pageTransition); |
| - private native void nativeLoadUrlWithoutUrlSanitizationWithUserAgentOverride( |
| - int nativeContentViewCoreImpl, String url, int pageTransition, |
| - String userAgentOverride); |
| + private native void nativeLoadUrl( |
| + int nativeContentViewCoreImpl, |
| + String url, |
| + int loadUrlType, |
| + int transitionType, |
| + int uaOverrideOption, |
| + byte[] postData, |
| + String baseUrlForDataUrl, |
| + String virtualUrlForDataUrl); |
| private native String nativeGetURL(int nativeContentViewCoreImpl); |