| 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/multipart_response_delegate.h" | 9 #include "content/child/multipart_response_delegate.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.h" | 13 #include "content/child/npapi/webplugin.h" |
| 14 #include "content/child/npapi/webplugin_resource_client.h" | 14 #include "content/child/npapi/webplugin_resource_client.h" |
| 15 #include "content/child/plugin_messages.h" | 15 #include "content/child/plugin_messages.h" |
| 16 #include "content/child/request_extra_data.h" | 16 #include "content/child/request_extra_data.h" |
| 17 #include "content/child/request_info.h" | 17 #include "content/child/request_info.h" |
| 18 #include "content/child/resource_dispatcher.h" | 18 #include "content/child/resource_dispatcher.h" |
| 19 #include "content/child/resource_loader_bridge.h" |
| 19 #include "content/child/web_url_loader_impl.h" | 20 #include "content/child/web_url_loader_impl.h" |
| 20 #include "content/common/resource_request_body.h" | 21 #include "content/common/resource_request_body.h" |
| 21 #include "content/common/service_worker/service_worker_types.h" | 22 #include "content/common/service_worker/service_worker_types.h" |
| 22 #include "content/public/common/resource_response_info.h" | 23 #include "content/public/common/resource_response_info.h" |
| 23 #include "net/base/load_flags.h" | 24 #include "net/base/load_flags.h" |
| 24 #include "net/base/net_errors.h" | 25 #include "net/base/net_errors.h" |
| 25 #include "net/http/http_response_headers.h" | 26 #include "net/http/http_response_headers.h" |
| 26 #include "net/url_request/redirect_info.h" | 27 #include "net/url_request/redirect_info.h" |
| 27 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 28 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
| 28 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 29 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 29 #include "webkit/child/resource_loader_bridge.h" | |
| 30 | 30 |
| 31 namespace content { | 31 namespace content { |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // This class handles individual multipart responses. It is instantiated when | 34 // This class handles individual multipart responses. It is instantiated when |
| 35 // we receive HTTP status code 206 in the HTTP response. This indicates | 35 // we receive HTTP status code 206 in the HTTP response. This indicates |
| 36 // that the response could have multiple parts each separated by a boundary | 36 // that the response could have multiple parts each separated by a boundary |
| 37 // specified in the response header. | 37 // specified in the response header. |
| 38 // TODO(jam): this is similar to MultiPartResponseClient in webplugin_impl.cc, | 38 // TODO(jam): this is similar to MultiPartResponseClient in webplugin_impl.cc, |
| 39 // we should remove that other class once we switch to loading from the plugin | 39 // we should remove that other class once we switch to loading from the plugin |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 366 } |
| 367 | 367 |
| 368 if (error_code == net::OK) { | 368 if (error_code == net::OK) { |
| 369 plugin_stream_->DidFinishLoading(resource_id_); | 369 plugin_stream_->DidFinishLoading(resource_id_); |
| 370 } else { | 370 } else { |
| 371 plugin_stream_->DidFail(resource_id_); | 371 plugin_stream_->DidFail(resource_id_); |
| 372 } | 372 } |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace content | 375 } // namespace content |
| OLD | NEW |