| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // successful commits or error pages that replace the previous page | 170 // successful commits or error pages that replace the previous page |
| 171 // (distinguished by |IsErrorPage|), and false for errors that leave the user | 171 // (distinguished by |IsErrorPage|), and false for errors that leave the user |
| 172 // on the previous page. | 172 // on the previous page. |
| 173 virtual bool HasCommitted() = 0; | 173 virtual bool HasCommitted() = 0; |
| 174 | 174 |
| 175 // Whether the navigation resulted in an error page. | 175 // Whether the navigation resulted in an error page. |
| 176 // Note that if an error page reloads, this will return true even though | 176 // Note that if an error page reloads, this will return true even though |
| 177 // GetNetErrorCode will be net::OK. | 177 // GetNetErrorCode will be net::OK. |
| 178 virtual bool IsErrorPage() = 0; | 178 virtual bool IsErrorPage() = 0; |
| 179 | 179 |
| 180 // True if the committed entry has replaced the existing one. A non-user |
| 181 // initiated redirect causes such replacement. |
| 182 virtual bool DidReplaceEntry() = 0; |
| 183 |
| 184 // Returns true if the browser history should be updated. Otherwise only |
| 185 // the session history will be updated. E.g., on unreachable urls. |
| 186 virtual bool ShouldUpdateHistory() = 0; |
| 187 |
| 180 // The previous main frame URL that the user was on. This may be empty if | 188 // The previous main frame URL that the user was on. This may be empty if |
| 181 // there was no last committed entry. | 189 // there was no last committed entry. |
| 182 virtual const GURL& GetPreviousURL() = 0; | 190 virtual const GURL& GetPreviousURL() = 0; |
| 183 | 191 |
| 184 // Returns the remote address of the socket which fetched this resource. | 192 // Returns the remote address of the socket which fetched this resource. |
| 185 virtual net::HostPortPair GetSocketAddress() = 0; | 193 virtual net::HostPortPair GetSocketAddress() = 0; |
| 186 | 194 |
| 187 // Returns the response headers for the request, or nullptr if there aren't | 195 // Returns the response headers for the request, or nullptr if there aren't |
| 188 // any response headers or they have not been received yet. The response | 196 // any response headers or they have not been received yet. The response |
| 189 // headers may change during the navigation (e.g. after encountering a server | 197 // headers may change during the navigation (e.g. after encountering a server |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 273 |
| 266 // The NavigationData that the embedder returned from | 274 // The NavigationData that the embedder returned from |
| 267 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 275 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
| 268 // be a clone of the NavigationData. | 276 // be a clone of the NavigationData. |
| 269 virtual NavigationData* GetNavigationData() = 0; | 277 virtual NavigationData* GetNavigationData() = 0; |
| 270 }; | 278 }; |
| 271 | 279 |
| 272 } // namespace content | 280 } // namespace content |
| 273 | 281 |
| 274 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 282 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |