| 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 RenderProcessHosts, and dispatches them to URLRequests. It then | 6 // from the RenderProcessHosts, and dispatches them to URLRequests. It then |
| 7 // fowards the messages from the URLRequests back to the correct process for | 7 // fowards the messages from the URLRequests back to the correct process for |
| 8 // handling. | 8 // 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 virtual bool OnResponseCompleted(int request_id, | 95 virtual bool OnResponseCompleted(int request_id, |
| 96 const net::URLRequestStatus& status, | 96 const net::URLRequestStatus& status, |
| 97 const std::string& security_info) = 0; | 97 const std::string& security_info) = 0; |
| 98 | 98 |
| 99 // This notification is synthesized by the RedirectToFileResourceHandler | 99 // This notification is synthesized by the RedirectToFileResourceHandler |
| 100 // to indicate progress of 'download_to_file' requests. OnReadCompleted | 100 // to indicate progress of 'download_to_file' requests. OnReadCompleted |
| 101 // calls are consumed by the RedirectToFileResourceHandler and replaced | 101 // calls are consumed by the RedirectToFileResourceHandler and replaced |
| 102 // with OnDataDownloaded calls. | 102 // with OnDataDownloaded calls. |
| 103 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) = 0; | 103 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) = 0; |
| 104 | 104 |
| 105 // Called when the priority of the net::URLRequest changes. This may happen if |
| 106 // a WebKit preload becomes an urgent request. |
| 107 virtual void OnRequestPriorityChanged(int request_id) {} |
| 108 |
| 105 protected: | 109 protected: |
| 106 ResourceHandler() : controller_(NULL) {} | 110 ResourceHandler() : controller_(NULL) {} |
| 107 ResourceController* controller() { return controller_; } | 111 ResourceController* controller() { return controller_; } |
| 108 | 112 |
| 109 private: | 113 private: |
| 110 ResourceController* controller_; | 114 ResourceController* controller_; |
| 111 }; | 115 }; |
| 112 | 116 |
| 113 } // namespace content | 117 } // namespace content |
| 114 | 118 |
| 115 #endif // CONTENT_BROWSER_LOADER_RESOURCE_HANDLER_H_ | 119 #endif // CONTENT_BROWSER_LOADER_RESOURCE_HANDLER_H_ |
| OLD | NEW |