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_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 // handlers. | 114 // handlers. |
| 115 virtual bool IsExternalProtocol() = 0; | 115 virtual bool IsExternalProtocol() = 0; |
| 116 | 116 |
| 117 // Navigation control flow -------------------------------------------------- | 117 // Navigation control flow -------------------------------------------------- |
| 118 | 118 |
| 119 // The net error code if an error happened prior to commit. Otherwise it will | 119 // The net error code if an error happened prior to commit. Otherwise it will |
| 120 // be net::OK. | 120 // be net::OK. |
| 121 virtual net::Error GetNetErrorCode() = 0; | 121 virtual net::Error GetNetErrorCode() = 0; |
| 122 | 122 |
| 123 // Returns the RenderFrameHost this navigation is taking place in. This can | 123 // Returns the RenderFrameHost this navigation is taking place in. This can |
| 124 // only be accessed after the navigation is ready to commit. | 124 // only be accessed after the navigation starts processing the response. |
| 125 // The RenderFrameHost returned back might not be the final one, if method is | |
| 126 // called before ReadyToCommitNavigation is dispatched. | |
|
clamy
2016/06/15 10:03:40
This is not true in PlzNavigate, and in the curren
| |
| 125 virtual RenderFrameHost* GetRenderFrameHost() = 0; | 127 virtual RenderFrameHost* GetRenderFrameHost() = 0; |
| 126 | 128 |
| 127 // Whether the navigation happened in the same page. This is only known | 129 // Whether the navigation happened in the same page. This is only known |
| 128 // after the navigation has committed. It is an error to call this method | 130 // after the navigation has committed. It is an error to call this method |
| 129 // before the navigation has committed. | 131 // before the navigation has committed. |
| 130 virtual bool IsSamePage() = 0; | 132 virtual bool IsSamePage() = 0; |
| 131 | 133 |
| 132 // Whether the navigation has encountered a server redirect or not. | 134 // Whether the navigation has encountered a server redirect or not. |
| 133 virtual bool WasServerRedirect() = 0; | 135 virtual bool WasServerRedirect() = 0; |
| 134 | 136 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 ui::PageTransition transition, | 178 ui::PageTransition transition, |
| 177 bool is_external_protocol) = 0; | 179 bool is_external_protocol) = 0; |
| 178 | 180 |
| 179 // Simulates the network request being redirected. | 181 // Simulates the network request being redirected. |
| 180 virtual NavigationThrottle::ThrottleCheckResult | 182 virtual NavigationThrottle::ThrottleCheckResult |
| 181 CallWillRedirectRequestForTesting(const GURL& new_url, | 183 CallWillRedirectRequestForTesting(const GURL& new_url, |
| 182 bool new_method_is_post, | 184 bool new_method_is_post, |
| 183 const GURL& new_referrer_url, | 185 const GURL& new_referrer_url, |
| 184 bool new_is_external_protocol) = 0; | 186 bool new_is_external_protocol) = 0; |
| 185 | 187 |
| 188 // Simulates that throttle is about to process the response. | |
| 189 virtual NavigationThrottle::ThrottleCheckResult | |
| 190 CallWillProcessResponseForTesting(RenderFrameHost* render_frame_host) = 0; | |
| 191 | |
| 186 // The NavigationData that the embedder returned from | 192 // The NavigationData that the embedder returned from |
| 187 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 193 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
| 188 // be a clone of the NavigationData. | 194 // be a clone of the NavigationData. |
| 189 virtual NavigationData* GetNavigationData() = 0; | 195 virtual NavigationData* GetNavigationData() = 0; |
| 190 }; | 196 }; |
| 191 | 197 |
| 192 } // namespace content | 198 } // namespace content |
| 193 | 199 |
| 194 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 200 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |