| 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 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 // Whether the navigation happened in the same page. Examples of same page | 154 // Whether the navigation happened in the same page. Examples of same page |
| 155 // navigations are: | 155 // navigations are: |
| 156 // * reference fragment navigations | 156 // * reference fragment navigations |
| 157 // * pushState/replaceState | 157 // * pushState/replaceState |
| 158 virtual bool IsSamePage() = 0; | 158 virtual bool IsSamePage() = 0; |
| 159 | 159 |
| 160 // Whether the navigation has encountered a server redirect or not. | 160 // Whether the navigation has encountered a server redirect or not. |
| 161 virtual bool WasServerRedirect() = 0; | 161 virtual bool WasServerRedirect() = 0; |
| 162 | 162 |
| 163 // Lists the redirects that occurred on the way to the current page. The |
| 164 // current page is the last one in the list (so even when there's no redirect, |
| 165 // there will be one entry in the list). |
| 166 virtual const std::vector<GURL>& GetRedirectChain() = 0; |
| 167 |
| 163 // Whether the navigation has committed. This returns true for either | 168 // Whether the navigation has committed. This returns true for either |
| 164 // successful commits or error pages that replace the previous page | 169 // successful commits or error pages that replace the previous page |
| 165 // (distinguished by |IsErrorPage|), and false for errors that leave the user | 170 // (distinguished by |IsErrorPage|), and false for errors that leave the user |
| 166 // on the previous page. | 171 // on the previous page. |
| 167 virtual bool HasCommitted() = 0; | 172 virtual bool HasCommitted() = 0; |
| 168 | 173 |
| 169 // Whether the navigation resulted in an error page. | 174 // Whether the navigation resulted in an error page. |
| 170 // Note that if an error page reloads, this will return true even though | 175 // Note that if an error page reloads, this will return true even though |
| 171 // GetNetErrorCode will be net::OK. | 176 // GetNetErrorCode will be net::OK. |
| 172 virtual bool IsErrorPage() = 0; | 177 virtual bool IsErrorPage() = 0; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 256 |
| 252 // The NavigationData that the embedder returned from | 257 // The NavigationData that the embedder returned from |
| 253 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 258 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
| 254 // be a clone of the NavigationData. | 259 // be a clone of the NavigationData. |
| 255 virtual NavigationData* GetNavigationData() = 0; | 260 virtual NavigationData* GetNavigationData() = 0; |
| 256 }; | 261 }; |
| 257 | 262 |
| 258 } // namespace content | 263 } // namespace content |
| 259 | 264 |
| 260 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 265 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |