| 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 10 matching lines...) Expand all Loading... |
| 21 #include "base/gtest_prod_util.h" | 21 #include "base/gtest_prod_util.h" |
| 22 #include "base/memory/linked_ptr.h" | 22 #include "base/memory/linked_ptr.h" |
| 23 #include "base/memory/scoped_ptr.h" | 23 #include "base/memory/scoped_ptr.h" |
| 24 #include "base/time.h" | 24 #include "base/time.h" |
| 25 #include "base/timer.h" | 25 #include "base/timer.h" |
| 26 #include "content/browser/download/download_resource_handler.h" | 26 #include "content/browser/download/download_resource_handler.h" |
| 27 #include "content/browser/renderer_host/resource_loader.h" | 27 #include "content/browser/renderer_host/resource_loader.h" |
| 28 #include "content/browser/renderer_host/resource_loader_delegate.h" | 28 #include "content/browser/renderer_host/resource_loader_delegate.h" |
| 29 #include "content/common/content_export.h" | 29 #include "content/common/content_export.h" |
| 30 #include "content/public/browser/child_process_data.h" | 30 #include "content/public/browser/child_process_data.h" |
| 31 #include "content/public/browser/download_id.h" |
| 31 #include "content/public/browser/notification_types.h" | 32 #include "content/public/browser/notification_types.h" |
| 32 #include "content/public/browser/resource_dispatcher_host.h" | 33 #include "content/public/browser/resource_dispatcher_host.h" |
| 33 #include "ipc/ipc_message.h" | 34 #include "ipc/ipc_message.h" |
| 34 #include "net/cookies/canonical_cookie.h" | 35 #include "net/cookies/canonical_cookie.h" |
| 35 #include "net/url_request/url_request.h" | 36 #include "net/url_request/url_request.h" |
| 36 #include "webkit/glue/resource_type.h" | 37 #include "webkit/glue/resource_type.h" |
| 37 | 38 |
| 38 class DownloadFileManager; | 39 class DownloadFileManager; |
| 39 class ResourceHandler; | 40 class ResourceHandler; |
| 40 class SaveFileManager; | 41 class SaveFileManager; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) OVERRIDE; | 75 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) OVERRIDE; |
| 75 virtual void SetAllowCrossOriginAuthPrompt(bool value) OVERRIDE; | 76 virtual void SetAllowCrossOriginAuthPrompt(bool value) OVERRIDE; |
| 76 virtual net::Error BeginDownload( | 77 virtual net::Error BeginDownload( |
| 77 scoped_ptr<net::URLRequest> request, | 78 scoped_ptr<net::URLRequest> request, |
| 78 bool is_content_initiated, | 79 bool is_content_initiated, |
| 79 ResourceContext* context, | 80 ResourceContext* context, |
| 80 int child_id, | 81 int child_id, |
| 81 int route_id, | 82 int route_id, |
| 82 bool prefer_cache, | 83 bool prefer_cache, |
| 83 const DownloadSaveInfo& save_info, | 84 const DownloadSaveInfo& save_info, |
| 85 const std::string& last_modified, |
| 86 const std::string& etag, |
| 87 content::DownloadId download_id, |
| 84 const DownloadStartedCallback& started_callback) OVERRIDE; | 88 const DownloadStartedCallback& started_callback) OVERRIDE; |
| 85 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) OVERRIDE; | 89 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) OVERRIDE; |
| 86 virtual void BlockRequestsForRoute(int child_id, int route_id) OVERRIDE; | 90 virtual void BlockRequestsForRoute(int child_id, int route_id) OVERRIDE; |
| 87 virtual void ResumeBlockedRequestsForRoute( | 91 virtual void ResumeBlockedRequestsForRoute( |
| 88 int child_id, int route_id) OVERRIDE; | 92 int child_id, int route_id) OVERRIDE; |
| 89 | 93 |
| 90 // Puts the resource dispatcher host in an inactive state (unable to begin | 94 // Puts the resource dispatcher host in an inactive state (unable to begin |
| 91 // new requests). Cancels all pending requests. | 95 // new requests). Cancels all pending requests. |
| 92 void Shutdown(); | 96 void Shutdown(); |
| 93 | 97 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // http://crbug.com/90971 - Assists in tracking down use-after-frees on | 424 // http://crbug.com/90971 - Assists in tracking down use-after-frees on |
| 421 // shutdown. | 425 // shutdown. |
| 422 std::set<const ResourceContext*> active_resource_contexts_; | 426 std::set<const ResourceContext*> active_resource_contexts_; |
| 423 | 427 |
| 424 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 428 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 425 }; | 429 }; |
| 426 | 430 |
| 427 } // namespace content | 431 } // namespace content |
| 428 | 432 |
| 429 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 433 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |