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

Side by Side Diff: content/browser/frame_host/navigation_handle_impl.h

Issue 2954343005: Merge ResourceRequestBodyImpl and ResourceRequestBody. (Closed)
Patch Set: Remove comment Created 3 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
7 7
8 #include "content/public/browser/navigation_handle.h" 8 #include "content/public/browser/navigation_handle.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 20 matching lines...) Expand all
31 #include "url/gurl.h" 31 #include "url/gurl.h"
32 32
33 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 33 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
34 34
35 namespace content { 35 namespace content {
36 36
37 class AppCacheNavigationHandle; 37 class AppCacheNavigationHandle;
38 class ChromeAppCacheService; 38 class ChromeAppCacheService;
39 class NavigationUIData; 39 class NavigationUIData;
40 class NavigatorDelegate; 40 class NavigatorDelegate;
41 class ResourceRequestBodyImpl; 41 class ResourceRequestBody;
42 class ServiceWorkerContextWrapper; 42 class ServiceWorkerContextWrapper;
43 class ServiceWorkerNavigationHandle; 43 class ServiceWorkerNavigationHandle;
44 44
45 // This class keeps track of a single navigation. It is created upon receipt of 45 // This class keeps track of a single navigation. It is created upon receipt of
46 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns 46 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns
47 // the newly created NavigationHandleImpl as long as the navigation is ongoing. 47 // the newly created NavigationHandleImpl as long as the navigation is ongoing.
48 // The NavigationHandleImpl in the RenderFrameHost will be reset when the 48 // The NavigationHandleImpl in the RenderFrameHost will be reset when the
49 // navigation stops, that is if one of the following events happen: 49 // navigation stops, that is if one of the following events happen:
50 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new 50 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new
51 // navigation (see below for special cases where the DidStartProvisionalLoad 51 // navigation (see below for special cases where the DidStartProvisionalLoad
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 // Updates the RenderFrameHost that is about to commit the navigation. This 233 // Updates the RenderFrameHost that is about to commit the navigation. This
234 // is used during transfer navigations. 234 // is used during transfer navigations.
235 void set_render_frame_host(RenderFrameHostImpl* render_frame_host) { 235 void set_render_frame_host(RenderFrameHostImpl* render_frame_host) {
236 render_frame_host_ = render_frame_host; 236 render_frame_host_ = render_frame_host;
237 } 237 }
238 238
239 // Returns the POST body associated with this navigation. This will be 239 // Returns the POST body associated with this navigation. This will be
240 // null for GET and/or other non-POST requests (or if a response to a POST 240 // null for GET and/or other non-POST requests (or if a response to a POST
241 // request was a redirect that changed the method to GET - for example 302). 241 // request was a redirect that changed the method to GET - for example 302).
242 const scoped_refptr<ResourceRequestBodyImpl>& resource_request_body() const { 242 const scoped_refptr<ResourceRequestBody>& resource_request_body() const {
243 return resource_request_body_; 243 return resource_request_body_;
244 } 244 }
245 245
246 // PlzNavigate 246 // PlzNavigate
247 void InitServiceWorkerHandle( 247 void InitServiceWorkerHandle(
248 ServiceWorkerContextWrapper* service_worker_context); 248 ServiceWorkerContextWrapper* service_worker_context);
249 ServiceWorkerNavigationHandle* service_worker_handle() const { 249 ServiceWorkerNavigationHandle* service_worker_handle() const {
250 return service_worker_handle_.get(); 250 return service_worker_handle_.get();
251 } 251 }
252 252
253 // PlzNavigate 253 // PlzNavigate
254 void InitAppCacheHandle(ChromeAppCacheService* appcache_service); 254 void InitAppCacheHandle(ChromeAppCacheService* appcache_service);
255 AppCacheNavigationHandle* appcache_handle() const { 255 AppCacheNavigationHandle* appcache_handle() const {
256 return appcache_handle_.get(); 256 return appcache_handle_.get();
257 } 257 }
258 258
259 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)> 259 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)>
260 ThrottleChecksFinishedCallback; 260 ThrottleChecksFinishedCallback;
261 261
262 // Called when the URLRequest will start in the network stack. |callback| 262 // Called when the URLRequest will start in the network stack. |callback|
263 // will be called when all throttle checks have completed. This will allow 263 // will be called when all throttle checks have completed. This will allow
264 // the caller to cancel the navigation or let it proceed. 264 // the caller to cancel the navigation or let it proceed.
265 void WillStartRequest( 265 void WillStartRequest(
266 const std::string& method, 266 const std::string& method,
267 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, 267 scoped_refptr<content::ResourceRequestBody> resource_request_body,
268 const Referrer& sanitized_referrer, 268 const Referrer& sanitized_referrer,
269 bool has_user_gesture, 269 bool has_user_gesture,
270 ui::PageTransition transition, 270 ui::PageTransition transition,
271 bool is_external_protocol, 271 bool is_external_protocol,
272 RequestContextType request_context_type, 272 RequestContextType request_context_type,
273 blink::WebMixedContentContextType mixed_content_context_type, 273 blink::WebMixedContentContextType mixed_content_context_type,
274 const ThrottleChecksFinishedCallback& callback); 274 const ThrottleChecksFinishedCallback& callback);
275 275
276 // Called when the URLRequest will be redirected in the network stack. 276 // Called when the URLRequest will be redirected in the network stack.
277 // |callback| will be called when all throttles check have completed. This 277 // |callback| will be called when all throttles check have completed. This
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 458
459 // The site URL of this navigation, as obtained from SiteInstance::GetSiteURL. 459 // The site URL of this navigation, as obtained from SiteInstance::GetSiteURL.
460 GURL site_url_; 460 GURL site_url_;
461 461
462 // The HTTP method used for the navigation. 462 // The HTTP method used for the navigation.
463 std::string method_; 463 std::string method_;
464 464
465 // The POST body associated with this navigation. This will be null for GET 465 // The POST body associated with this navigation. This will be null for GET
466 // and/or other non-POST requests (or if a response to a POST request was a 466 // and/or other non-POST requests (or if a response to a POST request was a
467 // redirect that changed the method to GET - for example 302). 467 // redirect that changed the method to GET - for example 302).
468 scoped_refptr<ResourceRequestBodyImpl> resource_request_body_; 468 scoped_refptr<ResourceRequestBody> resource_request_body_;
469 469
470 // The state the navigation is in. 470 // The state the navigation is in.
471 State state_; 471 State state_;
472 472
473 // Whether the navigation is in the middle of a transfer. Set to false when 473 // Whether the navigation is in the middle of a transfer. Set to false when
474 // the DidStartProvisionalLoad is received from the new renderer. 474 // the DidStartProvisionalLoad is received from the new renderer.
475 bool is_transferring_; 475 bool is_transferring_;
476 476
477 // The FrameTreeNode this navigation is happening in. 477 // The FrameTreeNode this navigation is happening in.
478 FrameTreeNode* frame_tree_node_; 478 FrameTreeNode* frame_tree_node_;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 int expected_render_process_host_id_; 581 int expected_render_process_host_id_;
582 582
583 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 583 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
584 584
585 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 585 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
586 }; 586 };
587 587
588 } // namespace content 588 } // namespace content
589 589
590 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 590 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.cc ('k') | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698