| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 namespace webkit_blob { | 50 namespace webkit_blob { |
| 51 class ShareableFileReference; | 51 class ShareableFileReference; |
| 52 } | 52 } |
| 53 | 53 |
| 54 namespace content { | 54 namespace content { |
| 55 class ResourceContext; | 55 class ResourceContext; |
| 56 class ResourceDispatcherHostDelegate; | 56 class ResourceDispatcherHostDelegate; |
| 57 class ResourceRequestInfoImpl; | 57 class ResourceRequestInfoImpl; |
| 58 struct DownloadSaveInfo; | 58 struct DownloadSaveInfo; |
| 59 struct GlobalRequestID; | 59 struct GlobalRequestID; |
| 60 struct Referrer; |
| 60 | 61 |
| 61 class CONTENT_EXPORT ResourceDispatcherHostImpl | 62 class CONTENT_EXPORT ResourceDispatcherHostImpl |
| 62 : public ResourceDispatcherHost, | 63 : public ResourceDispatcherHost, |
| 63 public net::URLRequest::Delegate, | 64 public net::URLRequest::Delegate, |
| 64 public SSLErrorHandler::Delegate { | 65 public SSLErrorHandler::Delegate { |
| 65 public: | 66 public: |
| 66 ResourceDispatcherHostImpl(); | 67 ResourceDispatcherHostImpl(); |
| 67 virtual ~ResourceDispatcherHostImpl(); | 68 virtual ~ResourceDispatcherHostImpl(); |
| 68 | 69 |
| 69 // Returns the current ResourceDispatcherHostImpl. May return NULL if it | 70 // Returns the current ResourceDispatcherHostImpl. May return NULL if it |
| (...skipping 25 matching lines...) Expand all Loading... |
| 95 | 96 |
| 96 // Returns true if the message was a resource message that was processed. | 97 // Returns true if the message was a resource message that was processed. |
| 97 // If it was, message_was_ok will be false iff the message was corrupt. | 98 // If it was, message_was_ok will be false iff the message was corrupt. |
| 98 bool OnMessageReceived(const IPC::Message& message, | 99 bool OnMessageReceived(const IPC::Message& message, |
| 99 ResourceMessageFilter* filter, | 100 ResourceMessageFilter* filter, |
| 100 bool* message_was_ok); | 101 bool* message_was_ok); |
| 101 | 102 |
| 102 // Initiates a save file from the browser process (as opposed to a resource | 103 // Initiates a save file from the browser process (as opposed to a resource |
| 103 // request from the renderer or another child process). | 104 // request from the renderer or another child process). |
| 104 void BeginSaveFile(const GURL& url, | 105 void BeginSaveFile(const GURL& url, |
| 105 const GURL& referrer, | 106 const content::Referrer& referrer, |
| 106 int child_id, | 107 int child_id, |
| 107 int route_id, | 108 int route_id, |
| 108 ResourceContext* context); | 109 ResourceContext* context); |
| 109 | 110 |
| 110 // Cancels the given request if it still exists. We ignore cancels from the | 111 // Cancels the given request if it still exists. We ignore cancels from the |
| 111 // renderer in the event of a download. | 112 // renderer in the event of a download. |
| 112 void CancelRequest(int child_id, | 113 void CancelRequest(int child_id, |
| 113 int request_id, | 114 int request_id, |
| 114 bool from_renderer); | 115 bool from_renderer); |
| 115 | 116 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 // http://crbug.com/90971 - Assists in tracking down use-after-frees on | 507 // http://crbug.com/90971 - Assists in tracking down use-after-frees on |
| 507 // shutdown. | 508 // shutdown. |
| 508 std::set<const ResourceContext*> canceled_resource_contexts_; | 509 std::set<const ResourceContext*> canceled_resource_contexts_; |
| 509 | 510 |
| 510 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 511 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 511 }; | 512 }; |
| 512 | 513 |
| 513 } // namespace content | 514 } // namespace content |
| 514 | 515 |
| 515 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 516 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |