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/renderer/npapi/webplugin_impl.h" | 5 #include "content/renderer/npapi/webplugin_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 } | 1276 } |
1277 | 1277 |
1278 ClientInfo info; | 1278 ClientInfo info; |
1279 info.id = resource_id; | 1279 info.id = resource_id; |
1280 info.client = client; | 1280 info.client = client; |
1281 info.request.initialize(); | 1281 info.request.initialize(); |
1282 info.request.setURL(url); | 1282 info.request.setURL(url); |
1283 info.request.setFirstPartyForCookies( | 1283 info.request.setFirstPartyForCookies( |
1284 webframe_->document().firstPartyForCookies()); | 1284 webframe_->document().firstPartyForCookies()); |
1285 info.request.setRequestorProcessID(delegate_->GetProcessId()); | 1285 info.request.setRequestorProcessID(delegate_->GetProcessId()); |
1286 info.request.setTargetType(WebURLRequest::TargetIsObject); | 1286 // TODO(mkwst): Is this a request for a plugin object itself |
| 1287 // (RequestContextObject), or a request that the plugin makes |
| 1288 // (RequestContextPlugin)? |
| 1289 info.request.setRequestContext(WebURLRequest::RequestContextPlugin); |
1287 info.request.setHTTPMethod(WebString::fromUTF8(method)); | 1290 info.request.setHTTPMethod(WebString::fromUTF8(method)); |
1288 info.pending_failure_notification = false; | 1291 info.pending_failure_notification = false; |
1289 info.notify_redirects = notify_redirects; | 1292 info.notify_redirects = notify_redirects; |
1290 info.is_plugin_src_load = is_plugin_src_load; | 1293 info.is_plugin_src_load = is_plugin_src_load; |
1291 info.data_offset = 0; | 1294 info.data_offset = 0; |
1292 | 1295 |
1293 if (range_info) { | 1296 if (range_info) { |
1294 info.request.addHTTPHeaderField(WebString::fromUTF8("Range"), | 1297 info.request.addHTTPHeaderField(WebString::fromUTF8("Range"), |
1295 WebString::fromUTF8(range_info)); | 1298 WebString::fromUTF8(range_info)); |
1296 } | 1299 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 case PLUGIN_SRC: | 1525 case PLUGIN_SRC: |
1523 webframe_->setReferrerForRequest(*request, plugin_url_); | 1526 webframe_->setReferrerForRequest(*request, plugin_url_); |
1524 break; | 1527 break; |
1525 | 1528 |
1526 default: | 1529 default: |
1527 break; | 1530 break; |
1528 } | 1531 } |
1529 } | 1532 } |
1530 | 1533 |
1531 } // namespace content | 1534 } // namespace content |
OLD | NEW |