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 |
11 | 11 |
12 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 12 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |
13 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 13 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |
14 | 14 |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "chrome/common/filter_policy.h" | 17 #include "chrome/common/filter_policy.h" |
18 #include "net/url_request/url_request_status.h" | 18 #include "net/url_request/url_request_status.h" |
19 #include "webkit/glue/resource_loader_bridge.h" | 19 #include "webkit/glue/resource_loader_bridge.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 class IOBuffer; | 22 class IOBuffer; |
23 } | 23 } |
24 | 24 |
25 // Parameters for a resource response header. | 25 // Parameters for a resource response header. |
26 struct ResourceResponseHead | 26 struct ResourceResponseHead |
27 : webkit_glue::ResourceLoaderBridge::ResponseInfo { | 27 : webkit_glue::ResourceLoaderBridge::ResponseInfo { |
| 28 ResourceResponseHead() : filter_policy(FilterPolicy::DONT_FILTER) {} |
| 29 |
28 // The response status. | 30 // The response status. |
29 URLRequestStatus status; | 31 URLRequestStatus status; |
30 | 32 |
31 // Specifies if the resource should be filtered before being displayed | 33 // Specifies if the resource should be filtered before being displayed |
32 // (insecure resources can be filtered to keep the page secure). | 34 // (insecure resources can be filtered to keep the page secure). |
33 FilterPolicy::Type filter_policy; | 35 FilterPolicy::Type filter_policy; |
34 }; | 36 }; |
35 | 37 |
36 // Parameters for a synchronous resource response. | 38 // Parameters for a synchronous resource response. |
37 struct SyncLoadResult : ResourceResponseHead { | 39 struct SyncLoadResult : ResourceResponseHead { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual bool OnReadCompleted(int request_id, int* bytes_read) = 0; | 85 virtual bool OnReadCompleted(int request_id, int* bytes_read) = 0; |
84 | 86 |
85 // The response is complete. The final response status is given. | 87 // The response is complete. The final response status is given. |
86 // Returns false if the handler is deferring the call to a later time. | 88 // Returns false if the handler is deferring the call to a later time. |
87 virtual bool OnResponseCompleted(int request_id, | 89 virtual bool OnResponseCompleted(int request_id, |
88 const URLRequestStatus& status, | 90 const URLRequestStatus& status, |
89 const std::string& security_info) = 0; | 91 const std::string& security_info) = 0; |
90 }; | 92 }; |
91 | 93 |
92 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 94 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |
OLD | NEW |