| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "android_webview/native/aw_contents_io_thread_client_impl.h" | 5 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "android_webview/common/devtools_instrumentation.h" | 10 #include "android_webview/common/devtools_instrumentation.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 scoped_ptr<AwWebResourceResponse> | 236 scoped_ptr<AwWebResourceResponse> |
| 237 AwContentsIoThreadClientImpl::ShouldInterceptRequest( | 237 AwContentsIoThreadClientImpl::ShouldInterceptRequest( |
| 238 const GURL& location, | 238 const GURL& location, |
| 239 const net::URLRequest* request) { | 239 const net::URLRequest* request) { |
| 240 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 240 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 241 if (java_object_.is_null()) | 241 if (java_object_.is_null()) |
| 242 return scoped_ptr<AwWebResourceResponse>(); | 242 return scoped_ptr<AwWebResourceResponse>(); |
| 243 const content::ResourceRequestInfo* info = | 243 const content::ResourceRequestInfo* info = |
| 244 content::ResourceRequestInfo::ForRequest(request); | 244 content::ResourceRequestInfo::ForRequest(request); |
| 245 bool is_main_frame = info && | 245 bool is_main_frame = info && |
| 246 info->GetResourceType() == ResourceType::MAIN_FRAME; | 246 info->GetResourceType() == content::RESOURCE_TYPE_MAIN_FRAME; |
| 247 bool has_user_gesture = info && info->HasUserGesture(); | 247 bool has_user_gesture = info && info->HasUserGesture(); |
| 248 | 248 |
| 249 vector<string> headers_names; | 249 vector<string> headers_names; |
| 250 vector<string> headers_values; | 250 vector<string> headers_values; |
| 251 { | 251 { |
| 252 net::HttpRequestHeaders headers; | 252 net::HttpRequestHeaders headers; |
| 253 if (!request->GetFullRequestHeaders(&headers)) | 253 if (!request->GetFullRequestHeaders(&headers)) |
| 254 headers = request->extra_request_headers(); | 254 headers = request->extra_request_headers(); |
| 255 net::HttpRequestHeaders::Iterator headers_iterator(headers); | 255 net::HttpRequestHeaders::Iterator headers_iterator(headers); |
| 256 while (headers_iterator.GetNext()) { | 256 while (headers_iterator.GetNext()) { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 Java_AwContentsIoThreadClient_newLoginRequest( | 374 Java_AwContentsIoThreadClient_newLoginRequest( |
| 375 env, java_object_.obj(), jrealm.obj(), jaccount.obj(), jargs.obj()); | 375 env, java_object_.obj(), jrealm.obj(), jaccount.obj(), jargs.obj()); |
| 376 } | 376 } |
| 377 | 377 |
| 378 bool RegisterAwContentsIoThreadClientImpl(JNIEnv* env) { | 378 bool RegisterAwContentsIoThreadClientImpl(JNIEnv* env) { |
| 379 return RegisterNativesImpl(env); | 379 return RegisterNativesImpl(env); |
| 380 } | 380 } |
| 381 | 381 |
| 382 } // namespace android_webview | 382 } // namespace android_webview |
| OLD | NEW |