| 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_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/browser/download_interrupt_reasons.h" | 10 #include "content/public/browser/download_interrupt_reasons.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // is started, |started_callback| will be called on the UI thread with the | 48 // is started, |started_callback| will be called on the UI thread with the |
| 49 // DownloadItem; otherwise an interrupt reason will be returned. | 49 // DownloadItem; otherwise an interrupt reason will be returned. |
| 50 virtual DownloadInterruptReason BeginDownload( | 50 virtual DownloadInterruptReason BeginDownload( |
| 51 scoped_ptr<net::URLRequest> request, | 51 scoped_ptr<net::URLRequest> request, |
| 52 const Referrer& referrer, | 52 const Referrer& referrer, |
| 53 bool is_content_initiated, | 53 bool is_content_initiated, |
| 54 ResourceContext* context, | 54 ResourceContext* context, |
| 55 int child_id, | 55 int child_id, |
| 56 int route_id, | 56 int route_id, |
| 57 bool prefer_cache, | 57 bool prefer_cache, |
| 58 bool do_not_prompt_for_login, |
| 58 scoped_ptr<DownloadSaveInfo> save_info, | 59 scoped_ptr<DownloadSaveInfo> save_info, |
| 59 uint32 download_id, | 60 uint32 download_id, |
| 60 const DownloadStartedCallback& started_callback) = 0; | 61 const DownloadStartedCallback& started_callback) = 0; |
| 61 | 62 |
| 62 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. | 63 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. |
| 63 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; | 64 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; |
| 64 | 65 |
| 65 // Causes all new requests for the route identified by |child_id| and | 66 // Causes all new requests for the route identified by |child_id| and |
| 66 // |route_id| to be blocked (not being started) until | 67 // |route_id| to be blocked (not being started) until |
| 67 // ResumeBlockedRequestsForRoute is called. | 68 // ResumeBlockedRequestsForRoute is called. |
| 68 virtual void BlockRequestsForRoute(int child_id, int route_id) = 0; | 69 virtual void BlockRequestsForRoute(int child_id, int route_id) = 0; |
| 69 | 70 |
| 70 // Resumes any blocked request for the specified route id. | 71 // Resumes any blocked request for the specified route id. |
| 71 virtual void ResumeBlockedRequestsForRoute(int child_id, int route_id) = 0; | 72 virtual void ResumeBlockedRequestsForRoute(int child_id, int route_id) = 0; |
| 72 | 73 |
| 73 protected: | 74 protected: |
| 74 virtual ~ResourceDispatcherHost() {} | 75 virtual ~ResourceDispatcherHost() {} |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace content | 78 } // namespace content |
| 78 | 79 |
| 79 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ | 80 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ |
| OLD | NEW |