| 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 "base/basictypes.h" |  | 
|  16 #include "base/ref_counted.h" |  | 
|  17 #include "chrome/common/filter_policy.h" |  15 #include "chrome/common/filter_policy.h" | 
|  18 #include "googleurl/src/gurl.h" |  16 #include "net/url_request/url_request_status.h" | 
|  19 #include "net/url_request/url_request.h" |  | 
|  20 #include "webkit/glue/resource_loader_bridge.h" |  17 #include "webkit/glue/resource_loader_bridge.h" | 
|  21  |  18  | 
 |  19 namespace net { | 
 |  20 class IOBuffer; | 
 |  21 } | 
 |  22  | 
|  22 // Parameters for a resource response header. |  23 // Parameters for a resource response header. | 
|  23 struct ResourceResponseHead |  24 struct ResourceResponseHead | 
|  24     : webkit_glue::ResourceLoaderBridge::ResponseInfo { |  25     : webkit_glue::ResourceLoaderBridge::ResponseInfo { | 
|  25   // The response status. |  26   // The response status. | 
|  26   URLRequestStatus status; |  27   URLRequestStatus status; | 
|  27  |  28  | 
|  28   // Specifies if the resource should be filtered before being displayed |  29   // Specifies if the resource should be filtered before being displayed | 
|  29   // (insecure resources can be filtered to keep the page secure). |  30   // (insecure resources can be filtered to keep the page secure). | 
|  30   FilterPolicy::Type filter_policy; |  31   FilterPolicy::Type filter_policy; | 
|  31 }; |  32 }; | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  79   // reading data. |  80   // reading data. | 
|  80   virtual bool OnReadCompleted(int request_id, int* bytes_read) = 0; |  81   virtual bool OnReadCompleted(int request_id, int* bytes_read) = 0; | 
|  81  |  82  | 
|  82   // The response is complete.  The final response status is given. |  83   // The response is complete.  The final response status is given. | 
|  83   // Returns false if the handler is deferring the call to a later time. |  84   // Returns false if the handler is deferring the call to a later time. | 
|  84   virtual bool OnResponseCompleted(int request_id, |  85   virtual bool OnResponseCompleted(int request_id, | 
|  85                                    const URLRequestStatus& status) = 0; |  86                                    const URLRequestStatus& status) = 0; | 
|  86 }; |  87 }; | 
|  87  |  88  | 
|  88 #endif  // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ |  89 #endif  // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_ | 
| OLD | NEW |