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" |
11 #include "content/child/npapi/plugin_stream_url.h" | 11 #include "content/child/npapi/plugin_stream_url.h" |
12 #include "content/child/npapi/webplugin.h" | 12 #include "content/child/npapi/webplugin.h" |
13 #include "content/child/npapi/webplugin_resource_client.h" | 13 #include "content/child/npapi/webplugin_resource_client.h" |
14 #include "content/child/plugin_messages.h" | 14 #include "content/child/plugin_messages.h" |
15 #include "content/child/request_extra_data.h" | 15 #include "content/child/request_extra_data.h" |
16 #include "content/child/resource_dispatcher.h" | 16 #include "content/child/resource_dispatcher.h" |
17 #include "content/child/web_url_loader_impl.h" | 17 #include "content/child/web_url_loader_impl.h" |
| 18 #include "content/common/service_worker/service_worker_types.h" |
18 #include "net/base/load_flags.h" | 19 #include "net/base/load_flags.h" |
19 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
20 #include "net/http/http_response_headers.h" | 21 #include "net/http/http_response_headers.h" |
21 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 22 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
22 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 23 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
23 #include "webkit/child/multipart_response_delegate.h" | 24 #include "webkit/child/multipart_response_delegate.h" |
24 #include "webkit/common/resource_request_body.h" | 25 #include "webkit/common/resource_request_body.h" |
25 | 26 |
26 namespace content { | 27 namespace content { |
27 namespace { | 28 namespace { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 false, | 112 false, |
112 render_frame_id, | 113 render_frame_id, |
113 false, | 114 false, |
114 GURL(), | 115 GURL(), |
115 false, | 116 false, |
116 -1, | 117 -1, |
117 true, | 118 true, |
118 PAGE_TRANSITION_LINK, | 119 PAGE_TRANSITION_LINK, |
119 false, | 120 false, |
120 -1, | 121 -1, |
121 -1); | 122 -1, |
| 123 kInvalidServiceWorkerProviderId); |
122 | 124 |
123 request_info.extra_data = &extra_data; | 125 request_info.extra_data = &extra_data; |
124 | 126 |
125 std::vector<char> body; | 127 std::vector<char> body; |
126 if (method == "POST") { | 128 if (method == "POST") { |
127 bool content_type_found = false; | 129 bool content_type_found = false; |
128 std::vector<std::string> names; | 130 std::vector<std::string> names; |
129 std::vector<std::string> values; | 131 std::vector<std::string> values; |
130 PluginHost::SetPostData(buf, len, &names, &values, &body); | 132 PluginHost::SetPostData(buf, len, &names, &values, &body); |
131 for (size_t i = 0; i < names.size(); ++i) { | 133 for (size_t i = 0; i < names.size(); ++i) { |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } | 352 } |
351 | 353 |
352 if (error_code == net::OK) { | 354 if (error_code == net::OK) { |
353 plugin_stream_->DidFinishLoading(resource_id_); | 355 plugin_stream_->DidFinishLoading(resource_id_); |
354 } else { | 356 } else { |
355 plugin_stream_->DidFail(resource_id_); | 357 plugin_stream_->DidFail(resource_id_); |
356 } | 358 } |
357 } | 359 } |
358 | 360 |
359 } // namespace content | 361 } // namespace content |
OLD | NEW |