| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // Called when a request begins. Return false to abort the request. | 40 // Called when a request begins. Return false to abort the request. |
| 41 virtual bool ShouldBeginRequest( | 41 virtual bool ShouldBeginRequest( |
| 42 int child_id, | 42 int child_id, |
| 43 int route_id, | 43 int route_id, |
| 44 const std::string& method, | 44 const std::string& method, |
| 45 const GURL& url, | 45 const GURL& url, |
| 46 ResourceType::Type resource_type, | 46 ResourceType::Type resource_type, |
| 47 ResourceContext* resource_context, | 47 ResourceContext* resource_context, |
| 48 const Referrer& referrer); | 48 const Referrer& referrer); |
| 49 | 49 |
| 50 // Called after ShouldBeginRequest when all the resource handlers from the | 50 // Called after ShouldBeginRequest to allow the embedder to add resource |
| 51 // content layer have been added. To add new handlers to the front, return | 51 // throttles. |
| 52 // a new handler that is chained to the given one, otherwise just reutrn the | |
| 53 // given handler. | |
| 54 virtual void RequestBeginning( | 52 virtual void RequestBeginning( |
| 55 net::URLRequest* request, | 53 net::URLRequest* request, |
| 56 ResourceContext* resource_context, | 54 ResourceContext* resource_context, |
| 57 ResourceType::Type resource_type, | 55 ResourceType::Type resource_type, |
| 58 int child_id, | 56 int child_id, |
| 59 int route_id, | 57 int route_id, |
| 60 bool is_continuation_of_transferred_request, | 58 bool is_continuation_of_transferred_request, |
| 61 ScopedVector<ResourceThrottle>* throttles); | 59 ScopedVector<ResourceThrottle>* throttles); |
| 62 | 60 |
| 63 // Allows an embedder to add additional resource handlers for a download. | 61 // Allows an embedder to add additional resource handlers for a download. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 ResourceResponse* response); | 113 ResourceResponse* response); |
| 116 | 114 |
| 117 protected: | 115 protected: |
| 118 ResourceDispatcherHostDelegate(); | 116 ResourceDispatcherHostDelegate(); |
| 119 virtual ~ResourceDispatcherHostDelegate(); | 117 virtual ~ResourceDispatcherHostDelegate(); |
| 120 }; | 118 }; |
| 121 | 119 |
| 122 } // namespace content | 120 } // namespace content |
| 123 | 121 |
| 124 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 122 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |