OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // The response is complete. The final response status is given. | 73 // The response is complete. The final response status is given. |
74 // Returns false if the handler is deferring the call to a later time. | 74 // Returns false if the handler is deferring the call to a later time. |
75 virtual bool OnResponseCompleted(int request_id, | 75 virtual bool OnResponseCompleted(int request_id, |
76 const URLRequestStatus& status, | 76 const URLRequestStatus& status, |
77 const std::string& security_info) = 0; | 77 const std::string& security_info) = 0; |
78 | 78 |
79 // Signals that the request is closed (i.e. finished successfully, cancelled). | 79 // Signals that the request is closed (i.e. finished successfully, cancelled). |
80 // This is a signal that the associated URLRequest isn't valid anymore. | 80 // This is a signal that the associated URLRequest isn't valid anymore. |
81 virtual void OnRequestClosed() = 0; | 81 virtual void OnRequestClosed() = 0; |
82 | 82 |
83 // This notification is synthesized by the RedirectToFileResourceHandler | |
84 // to indicate progress of 'download_to_file' requests. OnReadCompleted | |
85 // calls are consumed by the RedirectToFileResourceHandler and replaced | |
86 // with OnDataDownloaded calls. | |
87 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) {} | |
88 | |
89 protected: | 83 protected: |
90 friend class ChromeThread; | 84 friend class ChromeThread; |
91 friend class DeleteTask<ResourceHandler>; | 85 friend class DeleteTask<ResourceHandler>; |
92 | 86 |
93 virtual ~ResourceHandler() {} | 87 virtual ~ResourceHandler() {} |
94 }; | 88 }; |
95 | 89 |
96 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 90 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |
OLD | NEW |