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/request_info.h" | 16 #include "content/child/request_info.h" |
17 #include "content/child/resource_dispatcher.h" | 17 #include "content/child/resource_dispatcher.h" |
18 #include "content/child/web_url_loader_impl.h" | 18 #include "content/child/web_url_loader_impl.h" |
19 #include "content/common/resource_request_body.h" | 19 #include "content/common/resource_request_body.h" |
20 #include "content/common/service_worker/service_worker_types.h" | 20 #include "content/common/service_worker/service_worker_types.h" |
21 #include "net/base/load_flags.h" | 21 #include "net/base/load_flags.h" |
22 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
23 #include "net/http/http_response_headers.h" | 23 #include "net/http/http_response_headers.h" |
24 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 24 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
25 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 25 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
26 #include "webkit/child/multipart_response_delegate.h" | 26 #include "webkit/child/multipart_response_delegate.h" |
| 27 #include "webkit/child/resource_loader_bridge.h" |
27 #include "webkit/common/resource_response_info.h" | 28 #include "webkit/common/resource_response_info.h" |
28 | 29 |
29 namespace content { | 30 namespace content { |
30 namespace { | 31 namespace { |
31 | 32 |
32 // This class handles individual multipart responses. It is instantiated when | 33 // This class handles individual multipart responses. It is instantiated when |
33 // we receive HTTP status code 206 in the HTTP response. This indicates | 34 // we receive HTTP status code 206 in the HTTP response. This indicates |
34 // that the response could have multiple parts each separated by a boundary | 35 // that the response could have multiple parts each separated by a boundary |
35 // specified in the response header. | 36 // specified in the response header. |
36 // TODO(jam): this is similar to MultiPartResponseClient in webplugin_impl.cc, | 37 // TODO(jam): this is similar to MultiPartResponseClient in webplugin_impl.cc, |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 } | 350 } |
350 | 351 |
351 if (error_code == net::OK) { | 352 if (error_code == net::OK) { |
352 plugin_stream_->DidFinishLoading(resource_id_); | 353 plugin_stream_->DidFinishLoading(resource_id_); |
353 } else { | 354 } else { |
354 plugin_stream_->DidFail(resource_id_); | 355 plugin_stream_->DidFail(resource_id_); |
355 } | 356 } |
356 } | 357 } |
357 | 358 |
358 } // namespace content | 359 } // namespace content |
OLD | NEW |