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 "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 // when encountering a server redirect. | 21 // when encountering a server redirect. |
22 virtual const GURL& GetURL() const = 0; | 22 virtual const GURL& GetURL() const = 0; |
23 | 23 |
24 // The net error code if an error happened prior to commit. Otherwise it will | 24 // The net error code if an error happened prior to commit. Otherwise it will |
25 // be net::OK. | 25 // be net::OK. |
26 virtual net::Error GetNetErrorCode() const = 0; | 26 virtual net::Error GetNetErrorCode() const = 0; |
27 | 27 |
28 // Whether the navigation is taking place in the main frame or in a subframe. | 28 // Whether the navigation is taking place in the main frame or in a subframe. |
29 virtual bool IsInMainFrame() const = 0; | 29 virtual bool IsInMainFrame() const = 0; |
30 | 30 |
| 31 // Whether the navigation happened in the same page. This is only known |
| 32 // after the navigation has committed. It is an error to call this method |
| 33 // before the navigation has committed. |
| 34 virtual bool IsSamePage() = 0; |
| 35 |
31 // Whether the navigation has successfully committed a document. | 36 // Whether the navigation has successfully committed a document. |
32 virtual bool HasCommittedDocument() const = 0; | 37 virtual bool HasCommittedDocument() const = 0; |
33 | 38 |
34 // Whether an error page has committed for the navigation. | 39 // Whether an error page has committed for the navigation. |
35 virtual bool HasCommittedErrorPage() const = 0; | 40 virtual bool HasCommittedErrorPage() const = 0; |
36 }; | 41 }; |
37 | 42 |
38 } // namespace content | 43 } // namespace content |
39 | 44 |
40 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 45 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |