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

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

Issue 519533002: Initial PlzNavigate RDH-side logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
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_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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
23 class AuthChallengeInfo; 23 class AuthChallengeInfo;
24 class URLRequest; 24 class URLRequest;
25 } 25 }
26 26
27 namespace content { 27 namespace content {
28 28
29 class AppCacheService; 29 class AppCacheService;
30 class ResourceContext; 30 class ResourceContext;
31 class ResourceDispatcherHostLoginDelegate; 31 class ResourceDispatcherHostLoginDelegate;
32 class ResourceThrottle; 32 class ResourceThrottle;
33 class StreamHandle;
34 struct Referrer; 33 struct Referrer;
35 struct ResourceResponse; 34 struct ResourceResponse;
35 struct StreamInfo;
36 36
37 // Interface that the embedder provides to ResourceDispatcherHost to allow 37 // Interface that the embedder provides to ResourceDispatcherHost to allow
38 // observing and modifying requests. 38 // observing and modifying requests.
39 class CONTENT_EXPORT ResourceDispatcherHostDelegate { 39 class CONTENT_EXPORT ResourceDispatcherHostDelegate {
40 public: 40 public:
41 // Called when a request begins. Return false to abort the request. 41 // Called when a request begins. Return false to abort the request.
42 virtual bool ShouldBeginRequest(const std::string& method, 42 virtual bool ShouldBeginRequest(const std::string& method,
43 const GURL& url, 43 const GURL& url,
44 ResourceType resource_type, 44 ResourceType resource_type,
45 ResourceContext* resource_context); 45 ResourceContext* resource_context);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // the data that should be given to the old ResourceHandler to forward to the 93 // the data that should be given to the old ResourceHandler to forward to the
94 // renderer process. 94 // renderer process.
95 virtual bool ShouldInterceptResourceAsStream(net::URLRequest* request, 95 virtual bool ShouldInterceptResourceAsStream(net::URLRequest* request,
96 const std::string& mime_type, 96 const std::string& mime_type,
97 GURL* origin, 97 GURL* origin,
98 std::string* payload); 98 std::string* payload);
99 99
100 // Informs the delegate that a Stream was created. The Stream can be read from 100 // Informs the delegate that a Stream was created. The Stream can be read from
101 // the blob URL of the Stream, but can only be read once. 101 // the blob URL of the Stream, but can only be read once.
102 virtual void OnStreamCreated(net::URLRequest* request, 102 virtual void OnStreamCreated(net::URLRequest* request,
103 scoped_ptr<content::StreamHandle> stream); 103 scoped_ptr<content::StreamInfo> stream);
104 104
105 // Informs the delegate that a response has started. 105 // Informs the delegate that a response has started.
106 virtual void OnResponseStarted(net::URLRequest* request, 106 virtual void OnResponseStarted(net::URLRequest* request,
107 ResourceContext* resource_context, 107 ResourceContext* resource_context,
108 ResourceResponse* response, 108 ResourceResponse* response,
109 IPC::Sender* sender); 109 IPC::Sender* sender);
110 110
111 // Informs the delegate that a request has been redirected. 111 // Informs the delegate that a request has been redirected.
112 virtual void OnRequestRedirected(const GURL& redirect_url, 112 virtual void OnRequestRedirected(const GURL& redirect_url,
113 net::URLRequest* request, 113 net::URLRequest* request,
114 ResourceContext* resource_context, 114 ResourceContext* resource_context,
115 ResourceResponse* response); 115 ResourceResponse* response);
116 116
117 // Notification that a request has completed. 117 // Notification that a request has completed.
118 virtual void RequestComplete(net::URLRequest* url_request); 118 virtual void RequestComplete(net::URLRequest* url_request);
119 119
120 protected: 120 protected:
121 ResourceDispatcherHostDelegate(); 121 ResourceDispatcherHostDelegate();
122 virtual ~ResourceDispatcherHostDelegate(); 122 virtual ~ResourceDispatcherHostDelegate();
123 }; 123 };
124 124
125 } // namespace content 125 } // namespace content
126 126
127 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 127 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698