| 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 // The previous main frame URL that the user was on. This may be empty if |
| 181 // there was no last committed entry. |
| 182 virtual const GURL& GetPreviousURL() = 0; |
| 183 |
| 180 // Returns the remote address of the socket which fetched this resource. | 184 // Returns the remote address of the socket which fetched this resource. |
| 181 virtual net::HostPortPair GetSocketAddress() = 0; | 185 virtual net::HostPortPair GetSocketAddress() = 0; |
| 182 | 186 |
| 183 // Returns the response headers for the request, or nullptr if there aren't | 187 // Returns the response headers for the request, or nullptr if there aren't |
| 184 // any response headers or they have not been received yet. The response | 188 // any response headers or they have not been received yet. The response |
| 185 // headers may change during the navigation (e.g. after encountering a server | 189 // headers may change during the navigation (e.g. after encountering a server |
| 186 // redirect). The headers returned should not be modified, as modifications | 190 // redirect). The headers returned should not be modified, as modifications |
| 187 // will not be reflected in the network stack. | 191 // will not be reflected in the network stack. |
| 188 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; | 192 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; |
| 189 | 193 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 265 |
| 262 // The NavigationData that the embedder returned from | 266 // The NavigationData that the embedder returned from |
| 263 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 267 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
| 264 // be a clone of the NavigationData. | 268 // be a clone of the NavigationData. |
| 265 virtual NavigationData* GetNavigationData() = 0; | 269 virtual NavigationData* GetNavigationData() = 0; |
| 266 }; | 270 }; |
| 267 | 271 |
| 268 } // namespace content | 272 } // namespace content |
| 269 | 273 |
| 270 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 274 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |