Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 14 matching lines...) Expand all Loading... | |
| 25 #include "content/public/browser/navigation_data.h" | 25 #include "content/public/browser/navigation_data.h" |
| 26 #include "content/public/browser/navigation_throttle.h" | 26 #include "content/public/browser/navigation_throttle.h" |
| 27 #include "content/public/browser/ssl_status.h" | 27 #include "content/public/browser/ssl_status.h" |
| 28 #include "content/public/common/request_context_type.h" | 28 #include "content/public/common/request_context_type.h" |
| 29 #include "url/gurl.h" | 29 #include "url/gurl.h" |
| 30 | 30 |
| 31 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 31 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 | 34 |
| 35 class AppCacheNavigationHandle; | |
| 36 class ChromeAppCacheService; | |
| 35 class NavigationUIData; | 37 class NavigationUIData; |
| 36 class NavigatorDelegate; | 38 class NavigatorDelegate; |
| 37 class ResourceRequestBodyImpl; | 39 class ResourceRequestBodyImpl; |
| 38 class ServiceWorkerContextWrapper; | 40 class ServiceWorkerContextWrapper; |
| 39 class ServiceWorkerNavigationHandle; | 41 class ServiceWorkerNavigationHandle; |
| 40 | 42 |
| 41 // This class keeps track of a single navigation. It is created upon receipt of | 43 // This class keeps track of a single navigation. It is created upon receipt of |
| 42 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns | 44 // a DidStartProvisionalLoad IPC in a RenderFrameHost. The RenderFrameHost owns |
| 43 // the newly created NavigationHandleImpl as long as the navigation is ongoing. | 45 // the newly created NavigationHandleImpl as long as the navigation is ongoing. |
| 44 // The NavigationHandleImpl in the RenderFrameHost will be reset when the | 46 // The NavigationHandleImpl in the RenderFrameHost will be reset when the |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 return resource_request_body_; | 193 return resource_request_body_; |
| 192 } | 194 } |
| 193 | 195 |
| 194 // PlzNavigate | 196 // PlzNavigate |
| 195 void InitServiceWorkerHandle( | 197 void InitServiceWorkerHandle( |
| 196 ServiceWorkerContextWrapper* service_worker_context); | 198 ServiceWorkerContextWrapper* service_worker_context); |
| 197 ServiceWorkerNavigationHandle* service_worker_handle() const { | 199 ServiceWorkerNavigationHandle* service_worker_handle() const { |
| 198 return service_worker_handle_.get(); | 200 return service_worker_handle_.get(); |
| 199 } | 201 } |
| 200 | 202 |
| 203 // PlzNavigate | |
| 204 void InitAppCacheHandle(ChromeAppCacheService* appcache_service); | |
| 205 AppCacheNavigationHandle* appcache_handle() const { | |
| 206 return appcache_handle_.get(); | |
| 207 } | |
| 208 | |
| 201 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)> | 209 typedef base::Callback<void(NavigationThrottle::ThrottleCheckResult)> |
| 202 ThrottleChecksFinishedCallback; | 210 ThrottleChecksFinishedCallback; |
| 203 | 211 |
| 204 // Called when the URLRequest will start in the network stack. |callback| | 212 // Called when the URLRequest will start in the network stack. |callback| |
| 205 // will be called when all throttle checks have completed. This will allow | 213 // will be called when all throttle checks have completed. This will allow |
| 206 // the caller to cancel the navigation or let it proceed. | 214 // the caller to cancel the navigation or let it proceed. |
| 207 void WillStartRequest( | 215 void WillStartRequest( |
| 208 const std::string& method, | 216 const std::string& method, |
| 209 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, | 217 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, |
| 210 const Referrer& sanitized_referrer, | 218 const Referrer& sanitized_referrer, |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 // Whether the navigation ended up being a download or a stream. | 431 // Whether the navigation ended up being a download or a stream. |
| 424 bool is_download_; | 432 bool is_download_; |
| 425 bool is_stream_; | 433 bool is_stream_; |
| 426 | 434 |
| 427 // False by default unless the navigation started within a context menu. | 435 // False by default unless the navigation started within a context menu. |
| 428 bool started_from_context_menu_; | 436 bool started_from_context_menu_; |
| 429 | 437 |
| 430 GURL searchable_form_url_; | 438 GURL searchable_form_url_; |
| 431 std::string searchable_form_encoding_; | 439 std::string searchable_form_encoding_; |
| 432 | 440 |
| 441 // PlzNavigate | |
| 442 // Manages the lifetime of a pre-created AppCacheHost until the renderer | |
| 443 // registers the host with the AppCache system. | |
|
clamy
2016/11/25 13:32:24
Is it until the renderer registers the host or unt
ananta
2016/11/28 21:36:53
Rephrased.
| |
| 444 std::unique_ptr<AppCacheNavigationHandle> appcache_handle_; | |
| 445 | |
| 433 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 446 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
| 434 | 447 |
| 435 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 448 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 436 }; | 449 }; |
| 437 | 450 |
| 438 } // namespace content | 451 } // namespace content |
| 439 | 452 |
| 440 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 453 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |