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 |
11 | 11 |
12 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 12 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
13 #define CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 13 #define CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
14 | 14 |
15 #include <stdint.h> | 15 #include <stdint.h> |
16 | 16 |
17 #include <map> | 17 #include <map> |
18 #include <memory> | 18 #include <memory> |
19 #include <string> | 19 #include <string> |
20 #include <vector> | 20 #include <vector> |
21 | 21 |
22 #include "base/callback_forward.h" | 22 #include "base/callback_forward.h" |
23 #include "base/gtest_prod_util.h" | 23 #include "base/gtest_prod_util.h" |
24 #include "base/macros.h" | 24 #include "base/macros.h" |
25 #include "base/memory/ref_counted.h" | 25 #include "base/memory/ref_counted.h" |
26 #include "base/observer_list.h" | 26 #include "base/observer_list.h" |
27 #include "base/single_thread_task_runner.h" | 27 #include "base/single_thread_task_runner.h" |
28 #include "base/time/time.h" | 28 #include "base/time/time.h" |
| 29 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
29 #include "content/browser/loader/global_routing_id.h" | 30 #include "content/browser/loader/global_routing_id.h" |
30 #include "content/browser/loader/resource_loader_delegate.h" | 31 #include "content/browser/loader/resource_loader_delegate.h" |
31 #include "content/common/content_export.h" | 32 #include "content/common/content_export.h" |
32 #include "content/common/url_loader.mojom.h" | 33 #include "content/common/url_loader.mojom.h" |
33 #include "content/public/browser/global_request_id.h" | 34 #include "content/public/browser/global_request_id.h" |
34 #include "content/public/browser/resource_dispatcher_host.h" | 35 #include "content/public/browser/resource_dispatcher_host.h" |
35 #include "content/public/browser/resource_request_info.h" | 36 #include "content/public/browser/resource_request_info.h" |
36 #include "content/public/browser/stream_handle.h" | 37 #include "content/public/browser/stream_handle.h" |
37 #include "content/public/common/previews_state.h" | 38 #include "content/public/common/previews_state.h" |
38 #include "content/public/common/request_context_type.h" | 39 #include "content/public/common/request_context_type.h" |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 // or aborted, and in the latter case whether the renderer should be killed. | 587 // or aborted, and in the latter case whether the renderer should be killed. |
587 void ContinuePendingBeginRequest( | 588 void ContinuePendingBeginRequest( |
588 scoped_refptr<ResourceRequesterInfo> requester_info, | 589 scoped_refptr<ResourceRequesterInfo> requester_info, |
589 int request_id, | 590 int request_id, |
590 const ResourceRequest& request_data, | 591 const ResourceRequest& request_data, |
591 const SyncLoadResultCallback& sync_result_handler, // only valid for sync | 592 const SyncLoadResultCallback& sync_result_handler, // only valid for sync |
592 int route_id, | 593 int route_id, |
593 const net::HttpRequestHeaders& headers, | 594 const net::HttpRequestHeaders& headers, |
594 mojom::URLLoaderAssociatedRequest mojo_request, | 595 mojom::URLLoaderAssociatedRequest mojo_request, |
595 mojom::URLLoaderClientPtr url_loader_client, | 596 mojom::URLLoaderClientPtr url_loader_client, |
| 597 BlobHandles blob_handles, |
596 HeaderInterceptorResult interceptor_result); | 598 HeaderInterceptorResult interceptor_result); |
597 | 599 |
598 // Creates a ResourceHandler to be used by BeginRequest() for normal resource | 600 // Creates a ResourceHandler to be used by BeginRequest() for normal resource |
599 // loading. | 601 // loading. |
600 std::unique_ptr<ResourceHandler> CreateResourceHandler( | 602 std::unique_ptr<ResourceHandler> CreateResourceHandler( |
601 ResourceRequesterInfo* requester_info, | 603 ResourceRequesterInfo* requester_info, |
602 net::URLRequest* request, | 604 net::URLRequest* request, |
603 const ResourceRequest& request_data, | 605 const ResourceRequest& request_data, |
604 const SyncLoadResultCallback& sync_result_handler, | 606 const SyncLoadResultCallback& sync_result_handler, |
605 int route_id, | 607 int route_id, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 | 832 |
831 // Whether experimental web platform features are enabled. | 833 // Whether experimental web platform features are enabled. |
832 bool experimental_web_features_enabled_; | 834 bool experimental_web_features_enabled_; |
833 | 835 |
834 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 836 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
835 }; | 837 }; |
836 | 838 |
837 } // namespace content | 839 } // namespace content |
838 | 840 |
839 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 841 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
OLD | NEW |