| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/navigation_controller_android.h" | 5 #include "content/browser/frame_host/navigation_controller_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| 9 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
| 10 #include "content/browser/frame_host/navigation_entry_impl.h" | 12 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 11 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
| 12 #include "content/public/browser/navigation_controller.h" | 14 #include "content/public/browser/navigation_controller.h" |
| 13 #include "content/public/browser/ssl_host_state_delegate.h" | 15 #include "content/public/browser/ssl_host_state_delegate.h" |
| 14 #include "jni/NavigationControllerImpl_jni.h" | 16 #include "jni/NavigationControllerImpl_jni.h" |
| 15 #include "net/base/data_url.h" | 17 #include "net/base/data_url.h" |
| 16 #include "ui/gfx/android/java_bitmap.h" | 18 #include "ui/gfx/android/java_bitmap.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 static_cast<NavigationController::UserAgentOverrideOption>( | 220 static_cast<NavigationController::UserAgentOverrideOption>( |
| 219 ua_override_option); | 221 ua_override_option); |
| 220 params.can_load_local_resources = can_load_local_resources; | 222 params.can_load_local_resources = can_load_local_resources; |
| 221 params.is_renderer_initiated = is_renderer_initiated; | 223 params.is_renderer_initiated = is_renderer_initiated; |
| 222 params.should_replace_current_entry = should_replace_current_entry; | 224 params.should_replace_current_entry = should_replace_current_entry; |
| 223 | 225 |
| 224 if (extra_headers) | 226 if (extra_headers) |
| 225 params.extra_headers = ConvertJavaStringToUTF8(env, extra_headers); | 227 params.extra_headers = ConvertJavaStringToUTF8(env, extra_headers); |
| 226 | 228 |
| 227 if (post_data) { | 229 if (post_data) { |
| 228 std::vector<uint8> http_body_vector; | 230 std::vector<uint8_t> http_body_vector; |
| 229 base::android::JavaByteArrayToByteVector(env, post_data, &http_body_vector); | 231 base::android::JavaByteArrayToByteVector(env, post_data, &http_body_vector); |
| 230 params.browser_initiated_post_data = | 232 params.browser_initiated_post_data = |
| 231 base::RefCountedBytes::TakeVector(&http_body_vector); | 233 base::RefCountedBytes::TakeVector(&http_body_vector); |
| 232 } | 234 } |
| 233 | 235 |
| 234 if (base_url_for_data_url) { | 236 if (base_url_for_data_url) { |
| 235 params.base_url_for_data_url = | 237 params.base_url_for_data_url = |
| 236 GURL(ConvertJavaStringToUTF8(env, base_url_for_data_url)); | 238 GURL(ConvertJavaStringToUTF8(env, base_url_for_data_url)); |
| 237 } | 239 } |
| 238 | 240 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 const JavaParamRef<jobject>& obj, | 428 const JavaParamRef<jobject>& obj, |
| 427 jlong source_navigation_controller_android, | 429 jlong source_navigation_controller_android, |
| 428 jboolean replace_entry) { | 430 jboolean replace_entry) { |
| 429 navigation_controller_->CopyStateFromAndPrune( | 431 navigation_controller_->CopyStateFromAndPrune( |
| 430 reinterpret_cast<NavigationControllerAndroid*>( | 432 reinterpret_cast<NavigationControllerAndroid*>( |
| 431 source_navigation_controller_android)->navigation_controller_, | 433 source_navigation_controller_android)->navigation_controller_, |
| 432 replace_entry); | 434 replace_entry); |
| 433 } | 435 } |
| 434 | 436 |
| 435 } // namespace content | 437 } // namespace content |
| OLD | NEW |