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/common/resource_response_info.h" |
27 | 28 |
28 namespace content { | 29 namespace content { |
29 namespace { | 30 namespace { |
30 | 31 |
31 // This class handles individual multipart responses. It is instantiated when | 32 // This class handles individual multipart responses. It is instantiated when |
32 // we receive HTTP status code 206 in the HTTP response. This indicates | 33 // we receive HTTP status code 206 in the HTTP response. This indicates |
33 // that the response could have multiple parts each separated by a boundary | 34 // that the response could have multiple parts each separated by a boundary |
34 // specified in the response header. | 35 // specified in the response header. |
35 // TODO(jam): this is similar to MultiPartResponseClient in webplugin_impl.cc, | 36 // TODO(jam): this is similar to MultiPartResponseClient in webplugin_impl.cc, |
36 // we should remove that other class once we switch to loading from the plugin | 37 // we should remove that other class once we switch to loading from the plugin |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 342 } |
342 | 343 |
343 if (error_code == net::OK) { | 344 if (error_code == net::OK) { |
344 plugin_stream_->DidFinishLoading(resource_id_); | 345 plugin_stream_->DidFinishLoading(resource_id_); |
345 } else { | 346 } else { |
346 plugin_stream_->DidFail(resource_id_); | 347 plugin_stream_->DidFail(resource_id_); |
347 } | 348 } |
348 } | 349 } |
349 | 350 |
350 } // namespace content | 351 } // namespace content |
OLD | NEW |