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 12 matching lines...) Expand all Loading... |
23 #include "content/common/content_export.h" | 23 #include "content/common/content_export.h" |
24 #include "content/public/browser/global_request_id.h" | 24 #include "content/public/browser/global_request_id.h" |
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 blink { |
| 34 enum class WebMixedContentContextType; |
| 35 } |
33 namespace content { | 36 namespace content { |
34 | 37 |
35 class AppCacheNavigationHandle; | 38 class AppCacheNavigationHandle; |
36 class ChromeAppCacheService; | 39 class ChromeAppCacheService; |
37 class NavigationUIData; | 40 class NavigationUIData; |
38 class NavigatorDelegate; | 41 class NavigatorDelegate; |
39 class ResourceRequestBodyImpl; | 42 class ResourceRequestBodyImpl; |
40 class ServiceWorkerContextWrapper; | 43 class ServiceWorkerContextWrapper; |
41 class ServiceWorkerNavigationHandle; | 44 class ServiceWorkerNavigationHandle; |
42 | 45 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // NavigatorDelegate. In particular, the ContentBrowserClient should not be | 151 // NavigatorDelegate. In particular, the ContentBrowserClient should not be |
149 // called directly form the NavigationHandle code. Thus, these calls will not | 152 // called directly form the NavigationHandle code. Thus, these calls will not |
150 // expose the NavigationHandle when navigating to an InterstialPage. | 153 // expose the NavigationHandle when navigating to an InterstialPage. |
151 NavigatorDelegate* GetDelegate() const; | 154 NavigatorDelegate* GetDelegate() const; |
152 | 155 |
153 RequestContextType request_context_type() const { | 156 RequestContextType request_context_type() const { |
154 DCHECK_GE(state_, WILL_SEND_REQUEST); | 157 DCHECK_GE(state_, WILL_SEND_REQUEST); |
155 return request_context_type_; | 158 return request_context_type_; |
156 } | 159 } |
157 | 160 |
| 161 blink::WebMixedContentContextType mixed_content_context_type() const { |
| 162 DCHECK_GE(state_, WILL_SEND_REQUEST); |
| 163 return mixed_content_context_type_; |
| 164 } |
| 165 |
158 // Get the unique id from the NavigationEntry associated with this | 166 // Get the unique id from the NavigationEntry associated with this |
159 // NavigationHandle. Note that a synchronous, renderer-initiated navigation | 167 // NavigationHandle. Note that a synchronous, renderer-initiated navigation |
160 // will not have a NavigationEntry associated with it, and this will return 0. | 168 // will not have a NavigationEntry associated with it, and this will return 0. |
161 int pending_nav_entry_id() const { return pending_nav_entry_id_; } | 169 int pending_nav_entry_id() const { return pending_nav_entry_id_; } |
162 | 170 |
163 // Changes the pending NavigationEntry ID for this handle. This is currently | 171 // Changes the pending NavigationEntry ID for this handle. This is currently |
164 // required during transfer navigations. | 172 // required during transfer navigations. |
165 // TODO(creis): Remove this when transfer navigations do not require pending | 173 // TODO(creis): Remove this when transfer navigations do not require pending |
166 // entries. See https://crbug.com/495161. | 174 // entries. See https://crbug.com/495161. |
167 void update_entry_id_for_transfer(int nav_entry_id) { | 175 void update_entry_id_for_transfer(int nav_entry_id) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // will be called when all throttle checks have completed. This will allow | 222 // will be called when all throttle checks have completed. This will allow |
215 // the caller to cancel the navigation or let it proceed. | 223 // the caller to cancel the navigation or let it proceed. |
216 void WillStartRequest( | 224 void WillStartRequest( |
217 const std::string& method, | 225 const std::string& method, |
218 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, | 226 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, |
219 const Referrer& sanitized_referrer, | 227 const Referrer& sanitized_referrer, |
220 bool has_user_gesture, | 228 bool has_user_gesture, |
221 ui::PageTransition transition, | 229 ui::PageTransition transition, |
222 bool is_external_protocol, | 230 bool is_external_protocol, |
223 RequestContextType request_context_type, | 231 RequestContextType request_context_type, |
| 232 blink::WebMixedContentContextType mixed_content_context_type, |
224 const ThrottleChecksFinishedCallback& callback); | 233 const ThrottleChecksFinishedCallback& callback); |
225 | 234 |
226 // Called when the URLRequest will be redirected in the network stack. | 235 // Called when the URLRequest will be redirected in the network stack. |
227 // |callback| will be called when all throttles check have completed. This | 236 // |callback| will be called when all throttles check have completed. This |
228 // will allow the caller to cancel the navigation or let it proceed. | 237 // will allow the caller to cancel the navigation or let it proceed. |
229 // This will also inform the delegate that the request was redirected. | 238 // This will also inform the delegate that the request was redirected. |
230 void WillRedirectRequest( | 239 void WillRedirectRequest( |
231 const GURL& new_url, | 240 const GURL& new_url, |
232 const std::string& new_method, | 241 const std::string& new_method, |
233 const GURL& new_referrer_url, | 242 const GURL& new_referrer_url, |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 400 |
392 // The time this navigation started. | 401 // The time this navigation started. |
393 const base::TimeTicks navigation_start_; | 402 const base::TimeTicks navigation_start_; |
394 | 403 |
395 // The unique id of the corresponding NavigationEntry. | 404 // The unique id of the corresponding NavigationEntry. |
396 int pending_nav_entry_id_; | 405 int pending_nav_entry_id_; |
397 | 406 |
398 // The fetch request context type. | 407 // The fetch request context type. |
399 RequestContextType request_context_type_; | 408 RequestContextType request_context_type_; |
400 | 409 |
| 410 // The mixed content context type for potential mixed content checks. |
| 411 blink::WebMixedContentContextType mixed_content_context_type_; |
| 412 |
401 // This callback will be run when all throttle checks have been performed. | 413 // This callback will be run when all throttle checks have been performed. |
402 ThrottleChecksFinishedCallback complete_callback_; | 414 ThrottleChecksFinishedCallback complete_callback_; |
403 | 415 |
404 // PlzNavigate | 416 // PlzNavigate |
405 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a | 417 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a |
406 // corresponding ServiceWorkerNetworkProvider is created in the renderer. | 418 // corresponding ServiceWorkerNetworkProvider is created in the renderer. |
407 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; | 419 std::unique_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; |
408 | 420 |
409 // PlzNavigate | 421 // PlzNavigate |
410 // Manages the lifetime of a pre-created AppCacheHost until a browser side | 422 // Manages the lifetime of a pre-created AppCacheHost until a browser side |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 std::string searchable_form_encoding_; | 456 std::string searchable_form_encoding_; |
445 | 457 |
446 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 458 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
447 | 459 |
448 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 460 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
449 }; | 461 }; |
450 | 462 |
451 } // namespace content | 463 } // namespace content |
452 | 464 |
453 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 465 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
OLD | NEW |