| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This is the browser side of the resource dispatcher, it receives requests | 5 // This is the browser side of the resource dispatcher, it receives requests |
| 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and | 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and |
| 7 // dispatches them to URLRequests. It then forwards the messages from the | 7 // dispatches them to URLRequests. It then forwards the messages from the |
| 8 // URLRequests back to the correct process for handling. | 8 // URLRequests back to the correct process for handling. |
| 9 // | 9 // |
| 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "content/common/content_export.h" | 30 #include "content/common/content_export.h" |
| 31 #include "content/common/url_loader.mojom.h" | 31 #include "content/common/url_loader.mojom.h" |
| 32 #include "content/public/browser/global_request_id.h" | 32 #include "content/public/browser/global_request_id.h" |
| 33 #include "content/public/browser/resource_dispatcher_host.h" | 33 #include "content/public/browser/resource_dispatcher_host.h" |
| 34 #include "content/public/browser/resource_request_info.h" | 34 #include "content/public/browser/resource_request_info.h" |
| 35 #include "content/public/common/request_context_type.h" | 35 #include "content/public/common/request_context_type.h" |
| 36 #include "content/public/common/resource_type.h" | 36 #include "content/public/common/resource_type.h" |
| 37 #include "ipc/ipc_message.h" | 37 #include "ipc/ipc_message.h" |
| 38 #include "net/base/load_states.h" | 38 #include "net/base/load_states.h" |
| 39 #include "net/base/request_priority.h" | 39 #include "net/base/request_priority.h" |
| 40 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" |
| 40 #include "url/gurl.h" | 41 #include "url/gurl.h" |
| 41 | 42 |
| 42 namespace base { | 43 namespace base { |
| 43 class FilePath; | 44 class FilePath; |
| 44 class RepeatingTimer; | 45 class RepeatingTimer; |
| 45 } | 46 } |
| 46 | 47 |
| 47 namespace net { | 48 namespace net { |
| 48 class URLRequest; | 49 class URLRequest; |
| 49 class HttpRequestHeaders; | 50 class HttpRequestHeaders; |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 mojom::URLLoaderClientAssociatedPtr url_loader_client); | 612 mojom::URLLoaderClientAssociatedPtr url_loader_client); |
| 612 | 613 |
| 613 // Wraps |handler| in the standard resource handlers for normal resource | 614 // Wraps |handler| in the standard resource handlers for normal resource |
| 614 // loading and navigation requests. This adds MimeTypeResourceHandler and | 615 // loading and navigation requests. This adds MimeTypeResourceHandler and |
| 615 // ResourceThrottles. | 616 // ResourceThrottles. |
| 616 std::unique_ptr<ResourceHandler> AddStandardHandlers( | 617 std::unique_ptr<ResourceHandler> AddStandardHandlers( |
| 617 net::URLRequest* request, | 618 net::URLRequest* request, |
| 618 ResourceType resource_type, | 619 ResourceType resource_type, |
| 619 ResourceContext* resource_context, | 620 ResourceContext* resource_context, |
| 620 RequestContextType fetch_request_context_type, | 621 RequestContextType fetch_request_context_type, |
| 622 blink::WebMixedContentContextType fetch_mixed_content_context_type, |
| 621 AppCacheService* appcache_service, | 623 AppCacheService* appcache_service, |
| 622 int child_id, | 624 int child_id, |
| 623 int route_id, | 625 int route_id, |
| 624 std::unique_ptr<ResourceHandler> handler); | 626 std::unique_ptr<ResourceHandler> handler); |
| 625 | 627 |
| 626 void OnCancelRequest(ResourceRequesterInfo* requester_info, int request_id); | 628 void OnCancelRequest(ResourceRequesterInfo* requester_info, int request_id); |
| 627 void OnReleaseDownloadedFile(ResourceRequesterInfo* requester_info, | 629 void OnReleaseDownloadedFile(ResourceRequesterInfo* requester_info, |
| 628 int request_id); | 630 int request_id); |
| 629 void OnDidChangePriority(ResourceRequesterInfo* requester_info, | 631 void OnDidChangePriority(ResourceRequesterInfo* requester_info, |
| 630 int request_id, | 632 int request_id, |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 | 784 |
| 783 // Points to the registered download handler intercept. | 785 // Points to the registered download handler intercept. |
| 784 CreateDownloadHandlerIntercept create_download_handler_intercept_; | 786 CreateDownloadHandlerIntercept create_download_handler_intercept_; |
| 785 | 787 |
| 786 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 788 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 787 }; | 789 }; |
| 788 | 790 |
| 789 } // namespace content | 791 } // namespace content |
| 790 | 792 |
| 791 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 793 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |