Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: content/public/browser/resource_dispatcher_host.h

Issue 9836066: Have content cancel requests for ResourceContexts when they shutdown, instead of depending on the e… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/browser/resource_context.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "content/public/browser/download_id.h" 10 #include "content/public/browser/download_id.h"
(...skipping 16 matching lines...) Expand all
27 static ResourceDispatcherHost* Get(); 27 static ResourceDispatcherHost* Get();
28 28
29 // This does not take ownership of the delegate. It is expected that the 29 // This does not take ownership of the delegate. It is expected that the
30 // delegate have a longer lifetime than the ResourceDispatcherHost. 30 // delegate have a longer lifetime than the ResourceDispatcherHost.
31 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0; 31 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0;
32 32
33 // Controls whether third-party sub-content can pop-up HTTP basic auth 33 // Controls whether third-party sub-content can pop-up HTTP basic auth
34 // dialog boxes. 34 // dialog boxes.
35 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0; 35 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0;
36 36
37 // Force cancels any pending requests for the given |context|. This is
38 // necessary to ensure that before |context| goes away, all requests
39 // for it are dead.
40 virtual void CancelRequestsForContext(ResourceContext* context) = 0;
41
42 // Initiates a download by explicit request of the renderer, e.g. due to 37 // Initiates a download by explicit request of the renderer, e.g. due to
43 // alt-clicking a link. If the download is started, |started_callback| will 38 // alt-clicking a link. If the download is started, |started_callback| will
44 // be called on the UI thread with the DownloadId; otherwise an error code 39 // be called on the UI thread with the DownloadId; otherwise an error code
45 // will be returned. 40 // will be returned.
46 virtual net::Error BeginDownload( 41 virtual net::Error BeginDownload(
47 scoped_ptr<net::URLRequest> request, 42 scoped_ptr<net::URLRequest> request,
48 ResourceContext* context, 43 ResourceContext* context,
49 int child_id, 44 int child_id,
50 int route_id, 45 int route_id,
51 bool prefer_cache, 46 bool prefer_cache,
52 const DownloadSaveInfo& save_info, 47 const DownloadSaveInfo& save_info,
53 const DownloadStartedCallback& started_callback) = 0; 48 const DownloadStartedCallback& started_callback) = 0;
54 49
55 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. 50 // Clears the ResourceDispatcherHostLoginDelegate associated with the request.
56 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; 51 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0;
57 52
58 // Marks the request as "parked". This happens if a request is 53 // Marks the request as "parked". This happens if a request is
59 // redirected cross-site and needs to be resumed by a new render view. 54 // redirected cross-site and needs to be resumed by a new render view.
60 virtual void MarkAsTransferredNavigation(net::URLRequest* request) = 0; 55 virtual void MarkAsTransferredNavigation(net::URLRequest* request) = 0;
61 56
62 protected: 57 protected:
63 virtual ~ResourceDispatcherHost() {} 58 virtual ~ResourceDispatcherHost() {}
64 }; 59 };
65 60
66 } // namespace content 61 } // namespace content
67 62
68 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 63 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « content/public/browser/resource_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698