OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
11 | 11 |
12 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 12 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |
13 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 13 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |
14 #pragma once | 14 #pragma once |
15 | 15 |
16 #include <string> | 16 #include <string> |
17 | 17 |
| 18 #include "base/message_loop_helpers.h" |
18 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
19 | 20 |
20 class GURL; | 21 class GURL; |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 struct ResourceResponse; | 24 struct ResourceResponse; |
24 } | 25 } |
25 | 26 |
26 namespace net { | 27 namespace net { |
27 class IOBuffer; | 28 class IOBuffer; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual void OnRequestClosed() = 0; | 85 virtual void OnRequestClosed() = 0; |
85 | 86 |
86 // This notification is synthesized by the RedirectToFileResourceHandler | 87 // This notification is synthesized by the RedirectToFileResourceHandler |
87 // to indicate progress of 'download_to_file' requests. OnReadCompleted | 88 // to indicate progress of 'download_to_file' requests. OnReadCompleted |
88 // calls are consumed by the RedirectToFileResourceHandler and replaced | 89 // calls are consumed by the RedirectToFileResourceHandler and replaced |
89 // with OnDataDownloaded calls. | 90 // with OnDataDownloaded calls. |
90 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) {} | 91 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) {} |
91 | 92 |
92 protected: | 93 protected: |
93 friend class content::BrowserThread; | 94 friend class content::BrowserThread; |
94 friend class DeleteTask<ResourceHandler>; | 95 friend class base::DeleteHelper<ResourceHandler>; |
95 | 96 |
96 virtual ~ResourceHandler() {} | 97 virtual ~ResourceHandler() {} |
97 }; | 98 }; |
98 | 99 |
99 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 100 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |
OLD | NEW |