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

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

Issue 8801012: Add support for content::Referrer to prerender (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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/browser/renderer_host/resource_dispatcher_host.cc ('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) 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_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
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "webkit/glue/resource_type.h" 12 #include "webkit/glue/resource_type.h"
13 13
14 class GURL; 14 class GURL;
15 class ResourceDispatcherHostLoginDelegate; 15 class ResourceDispatcherHostLoginDelegate;
16 class ResourceHandler; 16 class ResourceHandler;
17 class ResourceMessageFilter; 17 class ResourceMessageFilter;
18 18
19 namespace content { 19 namespace content {
20 struct Referrer;
20 class ResourceContext; 21 class ResourceContext;
21 struct ResourceResponse; 22 struct ResourceResponse;
22 } 23 }
23 24
24 namespace net { 25 namespace net {
25 class AuthChallengeInfo; 26 class AuthChallengeInfo;
26 class SSLCertRequestInfo; 27 class SSLCertRequestInfo;
27 class URLRequest; 28 class URLRequest;
28 } 29 }
29 30
30 namespace content { 31 namespace content {
31 32
32 // Interface that the embedder provides to ResourceDispatcherHost to allow 33 // Interface that the embedder provides to ResourceDispatcherHost to allow
33 // observing and modifying requests. 34 // observing and modifying requests.
34 class ResourceDispatcherHostDelegate { 35 class ResourceDispatcherHostDelegate {
35 public: 36 public:
36 // Called when a request begins. Return false to abort the request. 37 // Called when a request begins. Return false to abort the request.
37 virtual bool ShouldBeginRequest( 38 virtual bool ShouldBeginRequest(
38 int child_id, 39 int child_id,
39 int route_id, 40 int route_id,
40 const std::string& method, 41 const std::string& method,
41 const GURL& url, 42 const GURL& url,
42 ResourceType::Type resource_type, 43 ResourceType::Type resource_type,
43 const content::ResourceContext& resource_context, 44 const content::ResourceContext& resource_context,
44 const GURL& referrer) = 0; 45 const content::Referrer& referrer) = 0;
45 46
46 // Called after ShouldBeginRequest when all the resource handlers from the 47 // Called after ShouldBeginRequest when all the resource handlers from the
47 // content layer have been added. To add new handlers to the front, return 48 // content layer have been added. To add new handlers to the front, return
48 // a new handler that is chained to the given one, otherwise just reutrn the 49 // a new handler that is chained to the given one, otherwise just reutrn the
49 // given handler. 50 // given handler.
50 virtual ResourceHandler* RequestBeginning( 51 virtual ResourceHandler* RequestBeginning(
51 ResourceHandler* handler, 52 ResourceHandler* handler,
52 net::URLRequest* request, 53 net::URLRequest* request,
53 const content::ResourceContext& resource_context, 54 const content::ResourceContext& resource_context,
54 bool is_subresource, 55 bool is_subresource,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ResourceMessageFilter* filter) = 0; 122 ResourceMessageFilter* filter) = 0;
122 123
123 protected: 124 protected:
124 ResourceDispatcherHostDelegate() {} 125 ResourceDispatcherHostDelegate() {}
125 virtual ~ResourceDispatcherHostDelegate() {} 126 virtual ~ResourceDispatcherHostDelegate() {}
126 }; 127 };
127 128
128 } // namespace content 129 } // namespace content
129 130
130 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 131 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698