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 49fd72ab923d5e8487434ea39dc2327bd5baf828..427f2030e83036a3e76f960eebd40d6ef6a1ac01 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 |
@@ -82,35 +82,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 & content::INVALIDATE_TYPE_TITLE) { |
@@ -266,21 +242,6 @@ void WebContentsDelegateAndroid::UpdateTargetURL(WebContents* source, |
java_url.obj()); |
} |
-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) { |