| 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 "components/web_contents_delegate_android/web_contents_delegate_android
.h" | 5 #include "components/web_contents_delegate_android/web_contents_delegate_android
.h" |
| 6 | 6 |
| 7 #include <android/keycodes.h> | 7 #include <android/keycodes.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 load_params.frame_tree_node_id = params.frame_tree_node_id; | 114 load_params.frame_tree_node_id = params.frame_tree_node_id; |
| 115 load_params.redirect_chain = params.redirect_chain; | 115 load_params.redirect_chain = params.redirect_chain; |
| 116 load_params.transition_type = params.transition; | 116 load_params.transition_type = params.transition; |
| 117 load_params.extra_headers = params.extra_headers; | 117 load_params.extra_headers = params.extra_headers; |
| 118 load_params.should_replace_current_entry = | 118 load_params.should_replace_current_entry = |
| 119 params.should_replace_current_entry; | 119 params.should_replace_current_entry; |
| 120 load_params.is_renderer_initiated = params.is_renderer_initiated; | 120 load_params.is_renderer_initiated = params.is_renderer_initiated; |
| 121 | 121 |
| 122 // Only allows the browser-initiated navigation to use POST. | 122 // Only allows the browser-initiated navigation to use POST. |
| 123 if (params.uses_post && !params.is_renderer_initiated) { | 123 if (params.uses_post && !params.is_renderer_initiated) { |
| 124 load_params.load_type = | 124 load_params.method = "POST"; |
| 125 content::NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST; | |
| 126 load_params.browser_initiated_post_data = | 125 load_params.browser_initiated_post_data = |
| 127 params.browser_initiated_post_data; | 126 params.browser_initiated_post_data; |
| 128 } | 127 } |
| 129 | 128 |
| 130 source->GetController().LoadURLWithParams(load_params); | 129 source->GetController().LoadURLWithParams(load_params); |
| 131 | 130 |
| 132 return source; | 131 return source; |
| 133 } | 132 } |
| 134 | 133 |
| 135 void WebContentsDelegateAndroid::NavigationStateChanged( | 134 void WebContentsDelegateAndroid::NavigationStateChanged( |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 // Native JNI methods | 436 // Native JNI methods |
| 438 // ---------------------------------------------------------------------------- | 437 // ---------------------------------------------------------------------------- |
| 439 | 438 |
| 440 // Register native methods | 439 // Register native methods |
| 441 | 440 |
| 442 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { | 441 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { |
| 443 return RegisterNativesImpl(env); | 442 return RegisterNativesImpl(env); |
| 444 } | 443 } |
| 445 | 444 |
| 446 } // namespace web_contents_delegate_android | 445 } // namespace web_contents_delegate_android |
| OLD | NEW |