| Index: chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
|
| diff --git a/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc b/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
|
| index a7e44f253eecb14a52237fdb4201818ac40f07a5..0fc0267164e42d0b2e203c7af41f18624f380713 100644
|
| --- a/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
|
| +++ b/chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.cc
|
| @@ -91,35 +91,11 @@ WebContents* WebContentsDelegateAndroid::OpenURLFromTab(
|
| return NULL;
|
| }
|
|
|
| - // TODO(mkosiba): This should be in platform_utils OpenExternal, b/6174564.
|
| - if (transition == content::PAGE_TRANSITION_LINK && ShouldOverrideLoading(url))
|
| - return NULL;
|
| -
|
| source->GetController().LoadURL(url, params.referrer, transition,
|
| std::string());
|
| return source;
|
| }
|
|
|
| -// ShouldIgnoreNavigation will be called for every non-local top level
|
| -// navigation made by the renderer. If true is returned the renderer will
|
| -// not perform the navigation. This is done by using synchronous IPC so we
|
| -// should avoid blocking calls from this method.
|
| -bool WebContentsDelegateAndroid::ShouldIgnoreNavigation(
|
| - WebContents* source,
|
| - const GURL& url,
|
| - const content::Referrer& referrer,
|
| - WindowOpenDisposition disposition,
|
| - content::PageTransition transition_type) {
|
| -
|
| - // Don't override new tabs.
|
| - if (disposition == NEW_FOREGROUND_TAB ||
|
| - disposition == NEW_BACKGROUND_TAB ||
|
| - disposition == OFF_THE_RECORD)
|
| - return false;
|
| -
|
| - return ShouldOverrideLoading(url);
|
| -}
|
| -
|
| void WebContentsDelegateAndroid::NavigationStateChanged(
|
| const WebContents* source, unsigned changed_flags) {
|
| if (changed_flags & (
|
| @@ -298,21 +274,6 @@ void WebContentsDelegateAndroid::OnStartDownload(WebContents* source,
|
| // source, download);
|
| }
|
|
|
| -bool WebContentsDelegateAndroid::ShouldOverrideLoading(const GURL& url) {
|
| - if (!url.is_valid())
|
| - return false;
|
| -
|
| - JNIEnv* env = AttachCurrentThread();
|
| - ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
|
| - if (obj.is_null())
|
| - return WebContentsDelegate::ShouldOverrideLoading(url);
|
| - ScopedJavaLocalRef<jstring> jstring_url =
|
| - ConvertUTF8ToJavaString(env, url.spec());
|
| - bool ret = Java_WebContentsDelegateAndroid_shouldOverrideUrlLoading(
|
| - env, obj.obj(), jstring_url.obj());
|
| - return ret;
|
| -}
|
| -
|
| void WebContentsDelegateAndroid::HandleKeyboardEvent(
|
| content::WebContents* source,
|
| const content::NativeWebKeyboardEvent& event) {
|
|
|