| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | 97 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 class CONTENT_EXPORT ResourceDispatcherHostImpl | 100 class CONTENT_EXPORT ResourceDispatcherHostImpl |
| 101 : public ResourceDispatcherHost, | 101 : public ResourceDispatcherHost, |
| 102 public ResourceLoaderDelegate { | 102 public ResourceLoaderDelegate { |
| 103 public: | 103 public: |
| 104 ResourceDispatcherHostImpl(); | 104 ResourceDispatcherHostImpl(); |
| 105 ~ResourceDispatcherHostImpl() override; | 105 ~ResourceDispatcherHostImpl() override; |
| 106 | 106 |
| 107 void Init(); |
| 108 |
| 107 // Returns the current ResourceDispatcherHostImpl. May return NULL if it | 109 // Returns the current ResourceDispatcherHostImpl. May return NULL if it |
| 108 // hasn't been created yet. | 110 // hasn't been created yet. |
| 109 static ResourceDispatcherHostImpl* Get(); | 111 static ResourceDispatcherHostImpl* Get(); |
| 110 | 112 |
| 111 // The following static methods should all be called from the UI thread. | 113 // The following static methods should all be called from the UI thread. |
| 112 | 114 |
| 113 // Resumes requests for a given render frame routing id. This will only resume | 115 // Resumes requests for a given render frame routing id. This will only resume |
| 114 // requests for a single frame. | 116 // requests for a single frame. |
| 115 static void ResumeBlockedRequestsForRouteFromUI( | 117 static void ResumeBlockedRequestsForRouteFromUI( |
| 116 const GlobalFrameRoutingId& global_routing_id); | 118 const GlobalFrameRoutingId& global_routing_id); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 // Allows tests to use a mock CertStore. If set, the CertStore must | 664 // Allows tests to use a mock CertStore. If set, the CertStore must |
| 663 // outlive this ResourceDispatcherHostImpl. | 665 // outlive this ResourceDispatcherHostImpl. |
| 664 CertStore* cert_store_for_testing_; | 666 CertStore* cert_store_for_testing_; |
| 665 | 667 |
| 666 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); | 668 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); |
| 667 }; | 669 }; |
| 668 | 670 |
| 669 } // namespace content | 671 } // namespace content |
| 670 | 672 |
| 671 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ | 673 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ |
| OLD | NEW |