| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual bool ShouldBeginRequest( | 35 virtual bool ShouldBeginRequest( |
| 36 int child_id, int route_id, | 36 int child_id, int route_id, |
| 37 const ResourceHostMsg_Request& request_data, | 37 const ResourceHostMsg_Request& request_data, |
| 38 const content::ResourceContext& resource_context, | 38 const content::ResourceContext& resource_context, |
| 39 const GURL& referrer); | 39 const GURL& referrer); |
| 40 | 40 |
| 41 // Called after ShouldBeginRequest when all the resource handlers from the | 41 // Called after ShouldBeginRequest when all the resource handlers from the |
| 42 // content layer have been added. To add new handlers to the front, return | 42 // content layer have been added. To add new handlers to the front, return |
| 43 // a new handler that is chained to the given one, otherwise just reutrn the | 43 // a new handler that is chained to the given one, otherwise just reutrn the |
| 44 // given handler. | 44 // given handler. |
| 45 virtual ResourceHandler* RequestBeginning(ResourceHandler* handler, | 45 virtual ResourceHandler* RequestBeginning( |
| 46 net::URLRequest* request, | 46 ResourceHandler* handler, |
| 47 bool is_subresource, | 47 net::URLRequest* request, |
| 48 int child_id, | 48 const content::ResourceContext& resource_context, |
| 49 int route_id); | 49 bool is_subresource, |
| 50 int child_id, |
| 51 int route_id); |
| 50 | 52 |
| 51 // Called when a download is starting, after the resource handles from the | 53 // Called when a download is starting, after the resource handles from the |
| 52 // content layer have been added. | 54 // content layer have been added. |
| 53 virtual ResourceHandler* DownloadStarting(ResourceHandler* handler, | 55 virtual ResourceHandler* DownloadStarting( |
| 54 int child_id, | 56 ResourceHandler* handler, |
| 55 int route_id); | 57 const content::ResourceContext& resource_context, |
| 58 int child_id, |
| 59 int route_id); |
| 56 | 60 |
| 57 // Called to determine whether a request's start should be deferred. This | 61 // Called to determine whether a request's start should be deferred. This |
| 58 // is only called if the ResourceHandler associated with the request does | 62 // is only called if the ResourceHandler associated with the request does |
| 59 // not ask for a deferral. A return value of true will defer the start of | 63 // not ask for a deferral. A return value of true will defer the start of |
| 60 // the request, false will continue the request. | 64 // the request, false will continue the request. |
| 61 virtual bool ShouldDeferStart( | 65 virtual bool ShouldDeferStart( |
| 62 net::URLRequest* request, | 66 net::URLRequest* request, |
| 63 const content::ResourceContext& resource_context); | 67 const content::ResourceContext& resource_context); |
| 64 | 68 |
| 65 // Called when an SSL Client Certificate is requested. If false is returned, | 69 // Called when an SSL Client Certificate is requested. If false is returned, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 net::URLRequest* request, | 105 net::URLRequest* request, |
| 102 ResourceResponse* response, | 106 ResourceResponse* response, |
| 103 ResourceMessageFilter* filter); | 107 ResourceMessageFilter* filter); |
| 104 | 108 |
| 105 protected: | 109 protected: |
| 106 ResourceDispatcherHostDelegate(); | 110 ResourceDispatcherHostDelegate(); |
| 107 virtual ~ResourceDispatcherHostDelegate(); | 111 virtual ~ResourceDispatcherHostDelegate(); |
| 108 }; | 112 }; |
| 109 | 113 |
| 110 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 114 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |