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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 params->extra_headers = entry.extra_headers(); | 229 params->extra_headers = entry.extra_headers(); |
230 params->transferred_request_child_id = | 230 params->transferred_request_child_id = |
231 entry.transferred_global_request_id().child_id; | 231 entry.transferred_global_request_id().child_id; |
232 params->transferred_request_request_id = | 232 params->transferred_request_request_id = |
233 entry.transferred_global_request_id().request_id; | 233 entry.transferred_global_request_id().request_id; |
234 params->is_overriding_user_agent = entry.GetIsOverridingUserAgent(); | 234 params->is_overriding_user_agent = entry.GetIsOverridingUserAgent(); |
235 // Avoid downloading when in view-source mode. | 235 // Avoid downloading when in view-source mode. |
236 params->allow_download = !entry.IsViewSourceMode(); | 236 params->allow_download = !entry.IsViewSourceMode(); |
237 params->embedder_channel_name = embedder_channel_name; | 237 params->embedder_channel_name = embedder_channel_name; |
238 params->embedder_container_id = embedder_container_id; | 238 params->embedder_container_id = embedder_container_id; |
| 239 params->is_post = entry.GetHasPostData(); |
| 240 if(entry.GetBrowserInitiatedPostData()) { |
| 241 params->browser_initiated_post_data.assign( |
| 242 entry.GetBrowserInitiatedPostData()->front(), |
| 243 entry.GetBrowserInitiatedPostData()->front() + |
| 244 entry.GetBrowserInitiatedPostData()->size()); |
| 245 |
| 246 } |
239 | 247 |
240 if (delegate) | 248 if (delegate) |
241 delegate->AddNavigationHeaders(params->url, ¶ms->extra_headers); | 249 delegate->AddNavigationHeaders(params->url, ¶ms->extra_headers); |
242 } | 250 } |
243 | 251 |
244 int GetSwitchValueAsInt( | 252 int GetSwitchValueAsInt( |
245 const CommandLine& command_line, | 253 const CommandLine& command_line, |
246 const std::string& switch_string, | 254 const std::string& switch_string, |
247 int min_value) { | 255 int min_value) { |
248 std::string string_value = command_line.GetSwitchValueASCII(switch_string); | 256 std::string string_value = command_line.GetSwitchValueASCII(switch_string); |
(...skipping 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3131 browser_plugin_host()->embedder_render_process_host(); | 3139 browser_plugin_host()->embedder_render_process_host(); |
3132 *embedder_container_id = browser_plugin_host()->instance_id(); | 3140 *embedder_container_id = browser_plugin_host()->instance_id(); |
3133 int embedder_process_id = | 3141 int embedder_process_id = |
3134 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3142 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
3135 if (embedder_process_id != -1) { | 3143 if (embedder_process_id != -1) { |
3136 *embedder_channel_name = | 3144 *embedder_channel_name = |
3137 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3145 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
3138 embedder_process_id); | 3146 embedder_process_id); |
3139 } | 3147 } |
3140 } | 3148 } |
OLD | NEW |