| Index: android_webview/native/aw_contents_io_thread_client_impl.cc
|
| diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc
|
| index 0251cefb7497a6ee4d30b306fc4917a18e4892f7..de8f1b1a9da3cab0732bb4de17a673effd6a261a 100644
|
| --- a/android_webview/native/aw_contents_io_thread_client_impl.cc
|
| +++ b/android_webview/native/aw_contents_io_thread_client_impl.cc
|
| @@ -17,6 +17,7 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host.h"
|
| +#include "content/public/browser/resource_request_info.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "googleurl/src/gurl.h"
|
| @@ -195,13 +196,16 @@ AwContentsIoThreadClientImpl::ShouldInterceptRequest(
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
| if (java_object_.is_null())
|
| return scoped_ptr<InterceptedRequestData>();
|
| + const content::ResourceRequestInfo* info =
|
| + content::ResourceRequestInfo::ForRequest(request);
|
| + bool is_main_frame = info && info->IsMainFrame();
|
|
|
| JNIEnv* env = AttachCurrentThread();
|
| ScopedJavaLocalRef<jstring> jstring_url =
|
| ConvertUTF8ToJavaString(env, location.spec());
|
| ScopedJavaLocalRef<jobject> ret =
|
| Java_AwContentsIoThreadClient_shouldInterceptRequest(
|
| - env, java_object_.obj(), jstring_url.obj());
|
| + env, java_object_.obj(), jstring_url.obj(), is_main_frame);
|
| if (ret.is_null())
|
| return scoped_ptr<InterceptedRequestData>();
|
| return scoped_ptr<InterceptedRequestData>(
|
|
|