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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 bool is_post, | 105 bool is_post, |
| 106 const Referrer& sanitized_referrer, | 106 const Referrer& sanitized_referrer, |
| 107 bool has_user_gesture, | 107 bool has_user_gesture, |
| 108 ui::PageTransition transition, | 108 ui::PageTransition transition, |
| 109 bool is_external_protocol) override; | 109 bool is_external_protocol) override; |
| 110 NavigationThrottle::ThrottleCheckResult CallWillRedirectRequestForTesting( | 110 NavigationThrottle::ThrottleCheckResult CallWillRedirectRequestForTesting( |
| 111 const GURL& new_url, | 111 const GURL& new_url, |
| 112 bool new_method_is_post, | 112 bool new_method_is_post, |
| 113 const GURL& new_referrer_url, | 113 const GURL& new_referrer_url, |
| 114 bool new_is_external_protocol) override; | 114 bool new_is_external_protocol) override; |
| 115 bool IsUsingLofi() const override; | |
| 116 bool UsedDataReductionProxy() const override; | |
| 115 | 117 |
| 116 NavigatorDelegate* GetDelegate() const; | 118 NavigatorDelegate* GetDelegate() const; |
| 117 | 119 |
| 118 // Returns the response headers for the request or nullptr if there are none. | 120 // Returns the response headers for the request or nullptr if there are none. |
| 119 // This should only be accessed after a redirect was encountered or after the | 121 // This should only be accessed after a redirect was encountered or after the |
| 120 // navigation is ready to commit. The headers returned should not be modified, | 122 // navigation is ready to commit. The headers returned should not be modified, |
| 121 // as modifications will not be reflected in the network stack. | 123 // as modifications will not be reflected in the network stack. |
| 122 const net::HttpResponseHeaders* GetResponseHeaders(); | 124 const net::HttpResponseHeaders* GetResponseHeaders(); |
| 123 | 125 |
| 124 // Get the unique id from the NavigationEntry associated with this | 126 // Get the unique id from the NavigationEntry associated with this |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 bool has_user_gesture_; | 251 bool has_user_gesture_; |
| 250 ui::PageTransition transition_; | 252 ui::PageTransition transition_; |
| 251 bool is_external_protocol_; | 253 bool is_external_protocol_; |
| 252 net::Error net_error_code_; | 254 net::Error net_error_code_; |
| 253 RenderFrameHostImpl* render_frame_host_; | 255 RenderFrameHostImpl* render_frame_host_; |
| 254 bool is_same_page_; | 256 bool is_same_page_; |
| 255 const bool is_synchronous_; | 257 const bool is_synchronous_; |
| 256 const bool is_srcdoc_; | 258 const bool is_srcdoc_; |
| 257 bool was_redirected_; | 259 bool was_redirected_; |
| 258 scoped_refptr<net::HttpResponseHeaders> response_headers_; | 260 scoped_refptr<net::HttpResponseHeaders> response_headers_; |
| 259 | |
| 260 // The state the navigation is in. | 261 // The state the navigation is in. |
| 261 State state_; | 262 State state_; |
| 262 | 263 |
| 263 // Whether the navigation is in the middle of a transfer. Set to false when | 264 // Whether the navigation is in the middle of a transfer. Set to false when |
| 264 // the DidStartProvisionalLoad is received from the new renderer. | 265 // the DidStartProvisionalLoad is received from the new renderer. |
| 265 bool is_transferring_; | 266 bool is_transferring_; |
| 266 | 267 |
| 267 // The FrameTreeNode this navigation is happening in. | 268 // The FrameTreeNode this navigation is happening in. |
| 268 FrameTreeNode* frame_tree_node_; | 269 FrameTreeNode* frame_tree_node_; |
| 269 | 270 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 280 const int pending_nav_entry_id_; | 281 const int pending_nav_entry_id_; |
| 281 | 282 |
| 282 // This callback will be run when all throttle checks have been performed. | 283 // This callback will be run when all throttle checks have been performed. |
| 283 ThrottleChecksFinishedCallback complete_callback_; | 284 ThrottleChecksFinishedCallback complete_callback_; |
| 284 | 285 |
| 285 // PlzNavigate | 286 // PlzNavigate |
| 286 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a | 287 // Manages the lifetime of a pre-created ServiceWorkerProviderHost until a |
| 287 // corresponding ServiceWorkerNetworkProvider is created in the renderer. | 288 // corresponding ServiceWorkerNetworkProvider is created in the renderer. |
| 288 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; | 289 scoped_ptr<ServiceWorkerNavigationHandle> service_worker_handle_; |
| 289 | 290 |
| 291 // True if the navigation used LoFi. | |
|
tbansal1
2016/03/08 22:14:43
Is is_using_lofi_ true when network was slow and C
RyanSturm
2016/03/10 00:37:58
Should be. It's determined via ShouldEnableLoFiMod
| |
| 292 bool is_using_lofi_; | |
|
tbansal1
2016/03/08 22:14:43
Initialize these to false in the constructor?
RyanSturm
2016/03/10 00:37:58
Done.
| |
| 293 | |
| 294 // True if the navigation was proxied through the data reduction proxy. | |
| 295 bool used_data_reduction_proxy_; | |
| 296 | |
| 290 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 297 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 291 }; | 298 }; |
| 292 | 299 |
| 293 } // namespace content | 300 } // namespace content |
| 294 | 301 |
| 295 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 302 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |