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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 1294243004: PlzNavigate: Make ServiceWorker work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 2 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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 namespace content { 61 namespace content {
62 class AppCacheService; 62 class AppCacheService;
63 class NavigationURLLoaderImplCore; 63 class NavigationURLLoaderImplCore;
64 class ResourceContext; 64 class ResourceContext;
65 class ResourceDispatcherHostDelegate; 65 class ResourceDispatcherHostDelegate;
66 class ResourceMessageDelegate; 66 class ResourceMessageDelegate;
67 class ResourceMessageFilter; 67 class ResourceMessageFilter;
68 class ResourceRequestInfoImpl; 68 class ResourceRequestInfoImpl;
69 class SaveFileManager; 69 class SaveFileManager;
70 class ServiceWorkerContextWrapper;
70 class WebContentsImpl; 71 class WebContentsImpl;
71 struct CommonNavigationParams; 72 struct CommonNavigationParams;
72 struct DownloadSaveInfo; 73 struct DownloadSaveInfo;
73 struct NavigationRequestInfo; 74 struct NavigationRequestInfo;
74 struct Referrer; 75 struct Referrer;
75 76
76 class CONTENT_EXPORT ResourceDispatcherHostImpl 77 class CONTENT_EXPORT ResourceDispatcherHostImpl
77 : public ResourceDispatcherHost, 78 : public ResourceDispatcherHost,
78 public ResourceLoaderDelegate { 79 public ResourceLoaderDelegate {
79 public: 80 public:
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // the request should cancel. 267 // the request should cancel.
267 bool HasSufficientResourcesForRequest(net::URLRequest* request); 268 bool HasSufficientResourcesForRequest(net::URLRequest* request);
268 269
269 // Called by a ResourceHandler after it has finished its request and is done 270 // Called by a ResourceHandler after it has finished its request and is done
270 // using its shared memory buffer. Frees up that file descriptor to be used 271 // using its shared memory buffer. Frees up that file descriptor to be used
271 // elsewhere. 272 // elsewhere.
272 void FinishedWithResourcesForRequest(net::URLRequest* request); 273 void FinishedWithResourcesForRequest(net::URLRequest* request);
273 274
274 // PlzNavigate: Begins a request for NavigationURLLoader. |loader| is the 275 // PlzNavigate: Begins a request for NavigationURLLoader. |loader| is the
275 // loader to attach to the leaf resource handler. 276 // loader to attach to the leaf resource handler.
276 void BeginNavigationRequest(ResourceContext* resource_context, 277 void BeginNavigationRequest(
277 const NavigationRequestInfo& info, 278 ResourceContext* resource_context,
278 NavigationURLLoaderImplCore* loader); 279 const NavigationRequestInfo& info,
280 NavigationURLLoaderImplCore* loader,
281 const scoped_refptr<ServiceWorkerContextWrapper>& service_worker_context);
279 282
280 private: 283 private:
281 friend class ResourceDispatcherHostTest; 284 friend class ResourceDispatcherHostTest;
282 285
283 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 286 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
284 TestBlockedRequestsProcessDies); 287 TestBlockedRequestsProcessDies);
285 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 288 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
286 CalculateApproximateMemoryCost); 289 CalculateApproximateMemoryCost);
287 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 290 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
288 DetachableResourceTimesOut); 291 DetachableResourceTimesOut);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 DelegateMap delegate_map_; 597 DelegateMap delegate_map_;
595 598
596 scoped_ptr<ResourceScheduler> scheduler_; 599 scoped_ptr<ResourceScheduler> scheduler_;
597 600
598 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 601 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
599 }; 602 };
600 603
601 } // namespace content 604 } // namespace content
602 605
603 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 606 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698