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