| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 bool IsPost() override; | 91 bool IsPost() override; |
| 92 const Referrer& GetReferrer() override; | 92 const Referrer& GetReferrer() override; |
| 93 bool HasUserGesture() override; | 93 bool HasUserGesture() override; |
| 94 ui::PageTransition GetPageTransition() override; | 94 ui::PageTransition GetPageTransition() override; |
| 95 bool IsExternalProtocol() override; | 95 bool IsExternalProtocol() override; |
| 96 net::Error GetNetErrorCode() override; | 96 net::Error GetNetErrorCode() override; |
| 97 RenderFrameHostImpl* GetRenderFrameHost() override; | 97 RenderFrameHostImpl* GetRenderFrameHost() override; |
| 98 bool IsSamePage() override; | 98 bool IsSamePage() override; |
| 99 bool HasCommitted() override; | 99 bool HasCommitted() override; |
| 100 bool IsErrorPage() override; | 100 bool IsErrorPage() override; |
| 101 const net::HttpResponseHeaders* GetResponseHeaders() override; |
| 101 void Resume() override; | 102 void Resume() override; |
| 102 void CancelDeferredNavigation( | 103 void CancelDeferredNavigation( |
| 103 NavigationThrottle::ThrottleCheckResult result) override; | 104 NavigationThrottle::ThrottleCheckResult result) override; |
| 104 void RegisterThrottleForTesting( | 105 void RegisterThrottleForTesting( |
| 105 std::unique_ptr<NavigationThrottle> navigation_throttle) override; | 106 std::unique_ptr<NavigationThrottle> navigation_throttle) override; |
| 106 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting( | 107 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting( |
| 107 bool is_post, | 108 bool is_post, |
| 108 const Referrer& sanitized_referrer, | 109 const Referrer& sanitized_referrer, |
| 109 bool has_user_gesture, | 110 bool has_user_gesture, |
| 110 ui::PageTransition transition, | 111 ui::PageTransition transition, |
| 111 bool is_external_protocol) override; | 112 bool is_external_protocol) override; |
| 112 NavigationThrottle::ThrottleCheckResult CallWillRedirectRequestForTesting( | 113 NavigationThrottle::ThrottleCheckResult CallWillRedirectRequestForTesting( |
| 113 const GURL& new_url, | 114 const GURL& new_url, |
| 114 bool new_method_is_post, | 115 bool new_method_is_post, |
| 115 const GURL& new_referrer_url, | 116 const GURL& new_referrer_url, |
| 116 bool new_is_external_protocol) override; | 117 bool new_is_external_protocol) override; |
| 117 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting( | 118 NavigationThrottle::ThrottleCheckResult CallWillProcessResponseForTesting( |
| 118 RenderFrameHost* render_frame_host) override; | 119 RenderFrameHost* render_frame_host) override; |
| 119 | 120 |
| 120 NavigationData* GetNavigationData() override; | 121 NavigationData* GetNavigationData() override; |
| 121 | 122 |
| 122 NavigatorDelegate* GetDelegate() const; | 123 NavigatorDelegate* GetDelegate() const; |
| 123 | 124 |
| 124 RequestContextType GetRequestContextType() const; | 125 RequestContextType GetRequestContextType() const; |
| 125 | 126 |
| 126 // Returns the response headers for the request or nullptr if there are none. | |
| 127 // This should only be accessed after a redirect was encountered or after the | |
| 128 // navigation is ready to commit. The headers returned should not be modified, | |
| 129 // as modifications will not be reflected in the network stack. | |
| 130 const net::HttpResponseHeaders* GetResponseHeaders(); | |
| 131 | |
| 132 // Get the unique id from the NavigationEntry associated with this | 127 // Get the unique id from the NavigationEntry associated with this |
| 133 // NavigationHandle. Note that a synchronous, renderer-initiated navigation | 128 // NavigationHandle. Note that a synchronous, renderer-initiated navigation |
| 134 // will not have a NavigationEntry associated with it, and this will return 0. | 129 // will not have a NavigationEntry associated with it, and this will return 0. |
| 135 int pending_nav_entry_id() const { return pending_nav_entry_id_; } | 130 int pending_nav_entry_id() const { return pending_nav_entry_id_; } |
| 136 | 131 |
| 137 // Changes the pending NavigationEntry ID for this handle. This is currently | 132 // Changes the pending NavigationEntry ID for this handle. This is currently |
| 138 // required during transfer navigations. | 133 // required during transfer navigations. |
| 139 // TODO(creis): Remove this when transfer navigations do not require pending | 134 // TODO(creis): Remove this when transfer navigations do not require pending |
| 140 // entries. See https://crbug.com/495161. | 135 // entries. See https://crbug.com/495161. |
| 141 void update_entry_id_for_transfer(int nav_entry_id) { | 136 void update_entry_id_for_transfer(int nav_entry_id) { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 318 |
| 324 // Embedder data tied to this navigation. | 319 // Embedder data tied to this navigation. |
| 325 std::unique_ptr<NavigationData> navigation_data_; | 320 std::unique_ptr<NavigationData> navigation_data_; |
| 326 | 321 |
| 327 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 322 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 328 }; | 323 }; |
| 329 | 324 |
| 330 } // namespace content | 325 } // namespace content |
| 331 | 326 |
| 332 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 327 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |