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

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

Issue 2467793002: use scoped_refptr
Patch Set: add test Created 4 years, 1 month 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/frame_host/navigation_handle_impl.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 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 12 matching lines...) Expand all
23 #include "content/public/browser/ssl_status.h" 23 #include "content/public/browser/ssl_status.h"
24 #include "content/public/common/request_context_type.h" 24 #include "content/public/common/request_context_type.h"
25 #include "url/gurl.h" 25 #include "url/gurl.h"
26 26
27 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 27 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
28 28
29 namespace content { 29 namespace content {
30 30
31 class NavigationUIData; 31 class NavigationUIData;
32 class NavigatorDelegate; 32 class NavigatorDelegate;
33 class ResourceMessageFilter;
33 class ResourceRequestBodyImpl; 34 class ResourceRequestBodyImpl;
34 class ServiceWorkerContextWrapper; 35 class ServiceWorkerContextWrapper;
35 class ServiceWorkerNavigationHandle; 36 class ServiceWorkerNavigationHandle;
36 37
37 // This class keeps track of a single navigation. It is created upon receipt of 38 // This class keeps track of a single navigation. It is created upon receipt of
38 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns 39 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns
39 // the newly created NavigationHandleImpl as long as the navigation is ongoing. 40 // the newly created NavigationHandleImpl as long as the navigation is ongoing.
40 // The NavigationHandleImpl in the RenderFrameHost will be reset when the 41 // The NavigationHandleImpl in the RenderFrameHost will be reset when the
41 // navigation stops, that is if one of the following events happen: 42 // navigation stops, that is if one of the following events happen:
42 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new 43 // - The RenderFrameHost receives a DidStartProvisionalLoad IPC for a new
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 179
179 // Returns the POST body associated with this navigation. This will be 180 // Returns the POST body associated with this navigation. This will be
180 // null for GET and/or other non-POST requests (or if a response to a POST 181 // null for GET and/or other non-POST requests (or if a response to a POST
181 // request was a redirect that changed the method to GET - for example 302). 182 // request was a redirect that changed the method to GET - for example 302).
182 const scoped_refptr<ResourceRequestBodyImpl>& resource_request_body() const { 183 const scoped_refptr<ResourceRequestBodyImpl>& resource_request_body() const {
183 return resource_request_body_; 184 return resource_request_body_;
184 } 185 }
185 186
186 // PlzNavigate 187 // PlzNavigate
187 void InitServiceWorkerHandle( 188 void InitServiceWorkerHandle(
188 ServiceWorkerContextWrapper* service_worker_context); 189 ServiceWorkerContextWrapper* service_worker_context,
190 ResourceMessageFilter* resource_message_filter);
189 ServiceWorkerNavigationHandle* service_worker_handle() const { 191 ServiceWorkerNavigationHandle* service_worker_handle() const {
190 return service_worker_handle_.get(); 192 return service_worker_handle_.get();
191 } 193 }
192 194
193 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)> 195 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)>
194 ThrottleChecksFinishedCallback; 196 ThrottleChecksFinishedCallback;
195 197
196 // Called when the URLRequest will start in the network stack. |callback| 198 // Called when the URLRequest will start in the network stack. |callback|
197 // will be called when all throttle checks have completed. This will allow 199 // will be called when all throttle checks have completed. This will allow
198 // the caller to cancel the navigation or let it proceed. 200 // the caller to cancel the navigation or let it proceed.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 bool started_from_context_menu_; 423 bool started_from_context_menu_;
422 424
423 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 425 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
424 426
425 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 427 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
426 }; 428 };
427 429
428 } // namespace content 430 } // namespace content
429 431
430 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 432 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698