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

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

Issue 519533002: Initial PlzNavigate RDH-side logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 // 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 namespace net { 48 namespace net {
49 class URLRequestJobFactory; 49 class URLRequestJobFactory;
50 } 50 }
51 51
52 namespace storage { 52 namespace storage {
53 class ShareableFileReference; 53 class ShareableFileReference;
54 } 54 }
55 55
56 namespace content { 56 namespace content {
57 class NavigationURLLoaderCore;
57 class ResourceContext; 58 class ResourceContext;
58 class ResourceDispatcherHostDelegate; 59 class ResourceDispatcherHostDelegate;
59 class ResourceMessageDelegate; 60 class ResourceMessageDelegate;
60 class ResourceMessageFilter; 61 class ResourceMessageFilter;
61 class ResourceRequestInfoImpl; 62 class ResourceRequestInfoImpl;
62 class SaveFileManager; 63 class SaveFileManager;
63 class WebContentsImpl; 64 class WebContentsImpl;
64 struct DownloadSaveInfo; 65 struct DownloadSaveInfo;
65 struct NavigationRequestInfo; 66 struct NavigationRequestInfo;
66 struct Referrer; 67 struct Referrer;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // sending it to the renderer. Returns true if there are enough file 243 // sending it to the renderer. Returns true if there are enough file
243 // descriptors available for the shared memory buffer. If false is returned, 244 // descriptors available for the shared memory buffer. If false is returned,
244 // the request should cancel. 245 // the request should cancel.
245 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); 246 bool HasSufficientResourcesForRequest(const net::URLRequest* request_);
246 247
247 // Called by a ResourceHandler after it has finished its request and is done 248 // Called by a ResourceHandler after it has finished its request and is done
248 // using its shared memory buffer. Frees up that file descriptor to be used 249 // using its shared memory buffer. Frees up that file descriptor to be used
249 // elsewhere. 250 // elsewhere.
250 void FinishedWithResourcesForRequest(const net::URLRequest* request_); 251 void FinishedWithResourcesForRequest(const net::URLRequest* request_);
251 252
252 // PlzNavigate 253 // PlzNavigate: Begins a request for NavigationURLLoader. |loader| is the
253 // Called by NavigationRequest to start a navigation request in the node 254 // loader to attach to the leaf resource handler. Returns true if the request
254 // identified by |frame_node_id|. 255 // was started.
255 void StartNavigationRequest(const NavigationRequestInfo& info, 256 bool BeginNavigationRequest(ResourceContext* resource_context,
257 int64 frame_tree_node_id,
258 const NavigationRequestInfo& info,
256 scoped_refptr<ResourceRequestBody> request_body, 259 scoped_refptr<ResourceRequestBody> request_body,
257 int64 navigation_request_id, 260 NavigationURLLoaderCore* loader);
258 int64 frame_node_id);
259
260 // PlzNavigate
261 // Called by NavigationRequest to cancel a navigation request with the
262 // provided |navigation_request_id| in the node identified by
263 // |frame_node_id|.
264 void CancelNavigationRequest(int64 navigation_request_id,
265 int64 frame_node_id);
266 261
267 private: 262 private:
268 friend class ResourceDispatcherHostTest; 263 friend class ResourceDispatcherHostTest;
269 264
270 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 265 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
271 TestBlockedRequestsProcessDies); 266 TestBlockedRequestsProcessDies);
272 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 267 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
273 CalculateApproximateMemoryCost); 268 CalculateApproximateMemoryCost);
274 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 269 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
275 DetachableResourceTimesOut); 270 DetachableResourceTimesOut);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 DelegateMap delegate_map_; 531 DelegateMap delegate_map_;
537 532
538 scoped_ptr<ResourceScheduler> scheduler_; 533 scoped_ptr<ResourceScheduler> scheduler_;
539 534
540 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 535 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
541 }; 536 };
542 537
543 } // namespace content 538 } // namespace content
544 539
545 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 540 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698