| 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 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 // Whether the navigation has encountered a server redirect or not. | 145 // Whether the navigation has encountered a server redirect or not. |
| 146 virtual bool WasServerRedirect() = 0; | 146 virtual bool WasServerRedirect() = 0; |
| 147 | 147 |
| 148 // Whether the navigation has committed. This returns true for either | 148 // Whether the navigation has committed. This returns true for either |
| 149 // successful commits or error pages that replace the previous page | 149 // successful commits or error pages that replace the previous page |
| 150 // (distinguished by |IsErrorPage|), and false for errors that leave the user | 150 // (distinguished by |IsErrorPage|), and false for errors that leave the user |
| 151 // on the previous page. | 151 // on the previous page. |
| 152 virtual bool HasCommitted() = 0; | 152 virtual bool HasCommitted() = 0; |
| 153 | 153 |
| 154 // Whether the navigation resulted in an error page. | 154 // Whether the navigation resulted in an error page. This includes |
| 155 // browser-generated error pages, such as the 'There is no Internet |
| 156 // connection' page, but not HTTP error pages, such as those with 4xx or 5xx |
| 157 // response codes. |
| 155 // Note that if an error page reloads, this will return true even though | 158 // Note that if an error page reloads, this will return true even though |
| 156 // GetNetErrorCode will be net::OK. | 159 // GetNetErrorCode will be net::OK. |
| 157 virtual bool IsErrorPage() = 0; | 160 virtual bool IsErrorPage() = 0; |
| 158 | 161 |
| 159 // Returns the response headers for the request or nullptr if there are none. | 162 // Returns the response headers for the request or nullptr if there are none. |
| 160 // This should only be accessed after a redirect was encountered or after the | 163 // This should only be accessed after a redirect was encountered or after the |
| 161 // navigation is ready to commit. The headers returned should not be modified, | 164 // navigation is ready to commit. The headers returned should not be modified, |
| 162 // as modifications will not be reflected in the network stack. | 165 // as modifications will not be reflected in the network stack. |
| 163 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; | 166 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; |
| 164 | 167 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 220 |
| 218 // The NavigationData that the embedder returned from | 221 // The NavigationData that the embedder returned from |
| 219 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 222 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
| 220 // be a clone of the NavigationData. | 223 // be a clone of the NavigationData. |
| 221 virtual NavigationData* GetNavigationData() = 0; | 224 virtual NavigationData* GetNavigationData() = 0; |
| 222 }; | 225 }; |
| 223 | 226 |
| 224 } // namespace content | 227 } // namespace content |
| 225 | 228 |
| 226 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 229 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |