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

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

Issue 2484633004: Change Lo-Fi bool to bitmask to support multiple Previews types (Closed)
Patch Set: clean up comments Created 4 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
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 net::URLRequest* request, 114 net::URLRequest* request,
115 ResourceContext* resource_context, 115 ResourceContext* resource_context,
116 ResourceResponse* response); 116 ResourceResponse* response);
117 117
118 // Notification that a request has completed. 118 // Notification that a request has completed.
119 virtual void RequestComplete(net::URLRequest* url_request, int net_error); 119 virtual void RequestComplete(net::URLRequest* url_request, int net_error);
120 // Deprecated. 120 // Deprecated.
121 // TODO(maksims): Remove this once all the callers are modified. 121 // TODO(maksims): Remove this once all the callers are modified.
122 virtual void RequestComplete(net::URLRequest* url_request); 122 virtual void RequestComplete(net::URLRequest* url_request);
123 123
124 // Asks the embedder if Lo-Fi mode should be enabled for the given request. It 124 // Asks the embedder for the Previews State which says which previews should
125 // is only called for requests with an unspecified Lo-Fi value. 125 // be enabled for the given request. It is only called for requests with an
126 virtual bool ShouldEnableLoFiMode(const net::URLRequest& url_request, 126 // unspecified Previews state.
127 content::ResourceContext* resource_context); 127 virtual int GetPreviewsState(int previews_state,
128 const net::URLRequest& url_request,
129 content::ResourceContext* resource_context);
128 130
129 // Asks the embedder for NavigationData related to this request. It is only 131 // Asks the embedder for NavigationData related to this request. It is only
130 // called for navigation requests. 132 // called for navigation requests.
131 virtual NavigationData* GetNavigationData(net::URLRequest* request) const; 133 virtual NavigationData* GetNavigationData(net::URLRequest* request) const;
132 134
133 // Get platform ClientCertStore. May return nullptr. 135 // Get platform ClientCertStore. May return nullptr.
134 virtual std::unique_ptr<net::ClientCertStore> CreateClientCertStore( 136 virtual std::unique_ptr<net::ClientCertStore> CreateClientCertStore(
135 ResourceContext* resource_context); 137 ResourceContext* resource_context);
136 138
137 // Notification that a main frame load was aborted. The |request_loading_time| 139 // Notification that a main frame load was aborted. The |request_loading_time|
138 // parameter contains the time between the load request start and abort. 140 // parameter contains the time between the load request start and abort.
139 // Called on the IO thread. 141 // Called on the IO thread.
140 virtual void OnAbortedFrameLoad(const GURL& url, 142 virtual void OnAbortedFrameLoad(const GURL& url,
141 base::TimeDelta request_loading_time); 143 base::TimeDelta request_loading_time);
142 144
143 protected: 145 protected:
144 virtual ~ResourceDispatcherHostDelegate(); 146 virtual ~ResourceDispatcherHostDelegate();
145 }; 147 };
146 148
147 } // namespace content 149 } // namespace content
148 150
149 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 151 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698