OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/child/npapi/plugin_url_fetcher.h" | 5 #include "content/child/npapi/plugin_url_fetcher.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "content/child/child_thread.h" | 8 #include "content/child/child_thread.h" |
9 #include "content/child/npapi/plugin_host.h" | 9 #include "content/child/npapi/plugin_host.h" |
10 #include "content/child/npapi/plugin_instance.h" | 10 #include "content/child/npapi/plugin_instance.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 webkit_glue::ResourceLoaderBridge::RequestInfo request_info; | 100 webkit_glue::ResourceLoaderBridge::RequestInfo request_info; |
101 request_info.method = method; | 101 request_info.method = method; |
102 request_info.url = url; | 102 request_info.url = url; |
103 request_info.first_party_for_cookies = first_party_for_cookies; | 103 request_info.first_party_for_cookies = first_party_for_cookies; |
104 request_info.referrer = referrer; | 104 request_info.referrer = referrer; |
105 request_info.load_flags = net::LOAD_NORMAL; | 105 request_info.load_flags = net::LOAD_NORMAL; |
106 request_info.requestor_pid = origin_pid; | 106 request_info.requestor_pid = origin_pid; |
107 request_info.request_type = ResourceType::OBJECT; | 107 request_info.request_type = ResourceType::OBJECT; |
108 request_info.routing_id = render_view_id; | 108 request_info.routing_id = render_view_id; |
109 | 109 |
110 RequestExtraData extra_data(blink::WebPageVisibilityStateVisible, | 110 RequestExtraData extra_data; |
111 base::string16(), | 111 extra_data.set_render_frame_id(render_frame_id); |
112 false, | 112 extra_data.set_is_main_frame(false); |
113 render_frame_id, | |
114 false, | |
115 GURL(), | |
116 false, | |
117 -1, | |
118 true, | |
119 PAGE_TRANSITION_LINK, | |
120 false, | |
121 -1, | |
122 -1, | |
123 kInvalidServiceWorkerProviderId); | |
124 | |
125 request_info.extra_data = &extra_data; | 113 request_info.extra_data = &extra_data; |
126 | 114 |
127 std::vector<char> body; | 115 std::vector<char> body; |
128 if (method == "POST") { | 116 if (method == "POST") { |
129 bool content_type_found = false; | 117 bool content_type_found = false; |
130 std::vector<std::string> names; | 118 std::vector<std::string> names; |
131 std::vector<std::string> values; | 119 std::vector<std::string> values; |
132 PluginHost::SetPostData(buf, len, &names, &values, &body); | 120 PluginHost::SetPostData(buf, len, &names, &values, &body); |
133 for (size_t i = 0; i < names.size(); ++i) { | 121 for (size_t i = 0; i < names.size(); ++i) { |
134 if (!request_info.headers.empty()) | 122 if (!request_info.headers.empty()) |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 } | 340 } |
353 | 341 |
354 if (error_code == net::OK) { | 342 if (error_code == net::OK) { |
355 plugin_stream_->DidFinishLoading(resource_id_); | 343 plugin_stream_->DidFinishLoading(resource_id_); |
356 } else { | 344 } else { |
357 plugin_stream_->DidFail(resource_id_); | 345 plugin_stream_->DidFail(resource_id_); |
358 } | 346 } |
359 } | 347 } |
360 | 348 |
361 } // namespace content | 349 } // namespace content |
OLD | NEW |