| 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 <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 base::android::ScopedJavaLocalRef<jobject> obj = ref.get(env); | 321 base::android::ScopedJavaLocalRef<jobject> obj = ref.get(env); |
| 322 if (obj.is_null()) | 322 if (obj.is_null()) |
| 323 return nullptr; | 323 return nullptr; |
| 324 | 324 |
| 325 web_request.ConvertToJava(env); | 325 web_request.ConvertToJava(env); |
| 326 | 326 |
| 327 devtools_instrumentation::ScopedEmbedderCallbackTask embedder_callback( | 327 devtools_instrumentation::ScopedEmbedderCallbackTask embedder_callback( |
| 328 "shouldInterceptRequest"); | 328 "shouldInterceptRequest"); |
| 329 ScopedJavaLocalRef<jobject> ret = | 329 ScopedJavaLocalRef<jobject> ret = |
| 330 AwContentsBackgroundThreadClient::shouldInterceptRequest( | 330 AwContentsBackgroundThreadClient::shouldInterceptRequest( |
| 331 env, | 331 env, obj, web_request.jstring_url, web_request.is_main_frame, |
| 332 obj.obj(), | 332 web_request.has_user_gesture, web_request.jstring_method, |
| 333 web_request.jstring_url.obj(), | 333 web_request.jstringArray_header_names, |
| 334 web_request.is_main_frame, | 334 web_request.jstringArray_header_values); |
| 335 web_request.has_user_gesture, | |
| 336 web_request.jstring_method.obj(), | |
| 337 web_request.jstringArray_header_names.obj(), | |
| 338 web_request.jstringArray_header_values.obj()); | |
| 339 return std::unique_ptr<AwWebResourceResponse>( | 335 return std::unique_ptr<AwWebResourceResponse>( |
| 340 ret.is_null() ? nullptr : new AwWebResourceResponseImpl(ret)); | 336 ret.is_null() ? nullptr : new AwWebResourceResponseImpl(ret)); |
| 341 } | 337 } |
| 342 | 338 |
| 343 std::unique_ptr<AwWebResourceResponse> ReturnNull() { | 339 std::unique_ptr<AwWebResourceResponse> ReturnNull() { |
| 344 return std::unique_ptr<AwWebResourceResponse>(); | 340 return std::unique_ptr<AwWebResourceResponse>(); |
| 345 } | 341 } |
| 346 | 342 |
| 347 } // namespace | 343 } // namespace |
| 348 | 344 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 Java_AwContentsIoThreadClient_onReceivedHttpError( | 505 Java_AwContentsIoThreadClient_onReceivedHttpError( |
| 510 env, java_object_, web_request.jstring_url, web_request.is_main_frame, | 506 env, java_object_, web_request.jstring_url, web_request.is_main_frame, |
| 511 web_request.has_user_gesture, web_request.jstring_method, | 507 web_request.has_user_gesture, web_request.jstring_method, |
| 512 web_request.jstringArray_header_names, | 508 web_request.jstringArray_header_names, |
| 513 web_request.jstringArray_header_values, jstring_mime_type, | 509 web_request.jstringArray_header_values, jstring_mime_type, |
| 514 jstring_encoding, status_code, jstring_reason, | 510 jstring_encoding, status_code, jstring_reason, |
| 515 jstringArray_response_header_names, jstringArray_response_header_values); | 511 jstringArray_response_header_names, jstringArray_response_header_values); |
| 516 } | 512 } |
| 517 | 513 |
| 518 } // namespace android_webview | 514 } // namespace android_webview |
| OLD | NEW |