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

Side by Side Diff: content/browser/appcache/appcache_request_handler.h

Issue 2982363002: Add support for fallback content for the frame. This includes main and subframes. (Closed)
Patch Set: rebase to tip Created 3 years, 4 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
« no previous file with comments | « no previous file | content/browser/appcache/appcache_request_handler.cc » ('j') | 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_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Sub-resource loading ------------------------------------- 153 // Sub-resource loading -------------------------------------
154 // Dedicated worker and all manner of sub-resources are handled here. 154 // Dedicated worker and all manner of sub-resources are handled here.
155 155
156 std::unique_ptr<AppCacheJob> MaybeLoadSubResource( 156 std::unique_ptr<AppCacheJob> MaybeLoadSubResource(
157 net::NetworkDelegate* network_delegate); 157 net::NetworkDelegate* network_delegate);
158 void ContinueMaybeLoadSubResource(); 158 void ContinueMaybeLoadSubResource();
159 159
160 // AppCacheHost::Observer override 160 // AppCacheHost::Observer override
161 void OnCacheSelectionComplete(AppCacheHost* host) override; 161 void OnCacheSelectionComplete(AppCacheHost* host) override;
162 162
163 // URLLoaderRequestHandler override 163 // Network service loading
164
165 // URLLoaderRequestHandler overrides
166 // These functions are invoked for loading AppCache content for the frame and
167 // for subresources.
164 void MaybeCreateLoader(const ResourceRequest& resource_request, 168 void MaybeCreateLoader(const ResourceRequest& resource_request,
165 ResourceContext* resource_context, 169 ResourceContext* resource_context,
166 LoaderCallback callback) override; 170 LoaderCallback callback) override;
167 mojom::URLLoaderFactoryPtr MaybeCreateSubresourceFactory() override; 171 mojom::URLLoaderFactoryPtr MaybeCreateSubresourceFactory() override;
172 bool MaybeCreateLoaderForResponse(
173 const ResourceResponseHead& response,
174 mojom::URLLoaderPtr* loader,
175 mojom::URLLoaderClientRequest* client_request) override;
168 176
169 // Data members ----------------------------------------------- 177 // Data members -----------------------------------------------
170 178
171 // What host we're servicing a request for. 179 // What host we're servicing a request for.
172 AppCacheHost* host_; 180 AppCacheHost* host_;
173 181
174 // Frame vs subresource vs sharedworker loads are somewhat different. 182 // Frame vs subresource vs sharedworker loads are somewhat different.
175 ResourceType resource_type_; 183 ResourceType resource_type_;
176 184
177 // True if corresponding AppCache group should be resetted before load. 185 // True if corresponding AppCache group should be resetted before load.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 236
229 // Network service related members. 237 // Network service related members.
230 238
231 // In the network service world we are queried via the URLLoaderRequestHandler 239 // In the network service world we are queried via the URLLoaderRequestHandler
232 // interface to see if the navigation request can be handled via the 240 // interface to see if the navigation request can be handled via the
233 // AppCache. We hold onto the AppCache job created here until the client 241 // AppCache. We hold onto the AppCache job created here until the client
234 // binds to it (Serviced via AppCache). If the request cannot be handled via 242 // binds to it (Serviced via AppCache). If the request cannot be handled via
235 // the AppCache, we delete the job. 243 // the AppCache, we delete the job.
236 std::unique_ptr<AppCacheJob> navigation_request_job_; 244 std::unique_ptr<AppCacheJob> navigation_request_job_;
237 245
238 // In the network service world, points to the getter for the network URL 246 // Points to the getter for the network URL loader.
239 // loader.
240 scoped_refptr<URLLoaderFactoryGetter> network_url_loader_factory_getter_; 247 scoped_refptr<URLLoaderFactoryGetter> network_url_loader_factory_getter_;
241 248
242 friend class content::AppCacheRequestHandlerTest; 249 friend class content::AppCacheRequestHandlerTest;
243 250
244 // Subresource load information. 251 // Subresource load information.
245 std::unique_ptr<SubresourceLoadInfo> subresource_load_info_; 252 std::unique_ptr<SubresourceLoadInfo> subresource_load_info_;
246 253
247 // The AppCache host instance. We pass this to the 254 // The AppCache host instance. We pass this to the
248 // AppCacheSubresourceURLFactory instance on creation. 255 // AppCacheSubresourceURLFactory instance on creation.
249 base::WeakPtr<AppCacheHost> appcache_host_; 256 base::WeakPtr<AppCacheHost> appcache_host_;
250 257
251 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); 258 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler);
252 }; 259 };
253 260
254 } // namespace content 261 } // namespace content
255 262
256 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ 263 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/appcache/appcache_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698