| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 virtual const std::vector<GURL>& GetRedirectChain() = 0; | 176 virtual const std::vector<GURL>& GetRedirectChain() = 0; |
| 177 | 177 |
| 178 // Whether the navigation has committed. Navigations that end up being | 178 // Whether the navigation has committed. Navigations that end up being |
| 179 // downloads or return 204/205 response codes do not commit (i.e. the | 179 // downloads or return 204/205 response codes do not commit (i.e. the |
| 180 // WebContents stays at the existing URL). | 180 // WebContents stays at the existing URL). |
| 181 // This returns true for either successful commits or error pages that | 181 // This returns true for either successful commits or error pages that |
| 182 // replace the previous page (distinguished by |IsErrorPage|), and false for | 182 // replace the previous page (distinguished by |IsErrorPage|), and false for |
| 183 // errors that leave the user on the previous page. | 183 // errors that leave the user on the previous page. |
| 184 virtual bool HasCommitted() = 0; | 184 virtual bool HasCommitted() = 0; |
| 185 | 185 |
| 186 // Whether the navigation is a download. This is useful when the navigation |
| 187 // hasn't committed yet, in which case HasCommitted() will return false even |
| 188 // if the navigation is not a download. |
| 189 virtual bool IsDownload() = 0; |
| 190 |
| 186 // Whether the navigation resulted in an error page. | 191 // Whether the navigation resulted in an error page. |
| 187 // Note that if an error page reloads, this will return true even though | 192 // Note that if an error page reloads, this will return true even though |
| 188 // GetNetErrorCode will be net::OK. | 193 // GetNetErrorCode will be net::OK. |
| 189 virtual bool IsErrorPage() = 0; | 194 virtual bool IsErrorPage() = 0; |
| 190 | 195 |
| 191 // True if the committed entry has replaced the existing one. A non-user | 196 // True if the committed entry has replaced the existing one. A non-user |
| 192 // initiated redirect causes such replacement. | 197 // initiated redirect causes such replacement. |
| 193 virtual bool DidReplaceEntry() = 0; | 198 virtual bool DidReplaceEntry() = 0; |
| 194 | 199 |
| 195 // Returns true if the browser history should be updated. Otherwise only | 200 // Returns true if the browser history should be updated. Otherwise only |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 289 |
| 285 // The NavigationData that the embedder returned from | 290 // The NavigationData that the embedder returned from |
| 286 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 291 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
| 287 // be a clone of the NavigationData. | 292 // be a clone of the NavigationData. |
| 288 virtual NavigationData* GetNavigationData() = 0; | 293 virtual NavigationData* GetNavigationData() = 0; |
| 289 }; | 294 }; |
| 290 | 295 |
| 291 } // namespace content | 296 } // namespace content |
| 292 | 297 |
| 293 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 298 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |