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

Unified Diff: content/browser/android/web_contents_observer_proxy.cc

Issue 1155713005: Use a resource throttle to implement shouldOverrideUrlLoading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add flag showing that shouldOverrideUrl cancelled the navigation Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/web_contents_observer_proxy.cc
diff --git a/content/browser/android/web_contents_observer_proxy.cc b/content/browser/android/web_contents_observer_proxy.cc
index f81e4f2e28330a39a2362b840aabce33f80aaa10..c4cb1b726bb65dde2cb165ab40113008b3d36d84 100644
--- a/content/browser/android/web_contents_observer_proxy.cc
+++ b/content/browser/android/web_contents_observer_proxy.cc
@@ -95,18 +95,20 @@ void WebContentsObserverProxy::DidFailProvisionalLoad(
RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
- const base::string16& error_description) {
+ const base::string16& error_description,
+ bool was_ignored_by_handler) {
DidFailLoadInternal(true, !render_frame_host->GetParent(), error_code,
- error_description, validated_url);
+ error_description, validated_url, was_ignored_by_handler);
}
void WebContentsObserverProxy::DidFailLoad(
RenderFrameHost* render_frame_host,
const GURL& validated_url,
int error_code,
- const base::string16& error_description) {
+ const base::string16& error_description,
+ bool was_ignored_by_handler) {
DidFailLoadInternal(false, !render_frame_host->GetParent(), error_code,
- error_description, validated_url);
+ error_description, validated_url, was_ignored_by_handler);
}
void WebContentsObserverProxy::DidNavigateMainFrame(
@@ -253,7 +255,8 @@ void WebContentsObserverProxy::DidFailLoadInternal(
bool is_main_frame,
int error_code,
const base::string16& description,
- const GURL& url) {
+ const GURL& url,
+ bool was_ignored_by_handler) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj(java_observer_);
ScopedJavaLocalRef<jstring> jstring_error_description(
@@ -263,7 +266,8 @@ void WebContentsObserverProxy::DidFailLoadInternal(
Java_WebContentsObserverProxy_didFailLoad(
env, obj.obj(), is_provisional_load, is_main_frame, error_code,
- jstring_error_description.obj(), jstring_url.obj());
+ jstring_error_description.obj(), jstring_url.obj(),
+ was_ignored_by_handler);
}
void WebContentsObserverProxy::DidFirstVisuallyNonEmptyPaint() {

Powered by Google App Engine
This is Rietveld 408576698