| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // successful commits or error pages that replace the previous page | 152 // successful commits or error pages that replace the previous page |
| 153 // (distinguished by |IsErrorPage|), and false for errors that leave the user | 153 // (distinguished by |IsErrorPage|), and false for errors that leave the user |
| 154 // on the previous page. | 154 // on the previous page. |
| 155 virtual bool HasCommitted() = 0; | 155 virtual bool HasCommitted() = 0; |
| 156 | 156 |
| 157 // Whether the navigation resulted in an error page. | 157 // Whether the navigation resulted in an error page. |
| 158 // 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 |
| 159 // GetNetErrorCode will be net::OK. | 159 // GetNetErrorCode will be net::OK. |
| 160 virtual bool IsErrorPage() = 0; | 160 virtual bool IsErrorPage() = 0; |
| 161 | 161 |
| 162 // 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 aren't |
| 163 // This should only be accessed after a redirect was encountered or after the | 163 // any response headers or they have not been received yet. The response |
| 164 // navigation is ready to commit. The headers returned should not be modified, | 164 // headers may change during the navigation (e.g. after encountering a server |
| 165 // as modifications will not be reflected in the network stack. | 165 // redirect). The headers returned should not be modified, as modifications |
| 166 // will not be reflected in the network stack. |
| 166 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; | 167 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; |
| 167 | 168 |
| 168 // Resumes a navigation that was previously deferred by a NavigationThrottle. | 169 // Resumes a navigation that was previously deferred by a NavigationThrottle. |
| 169 virtual void Resume() = 0; | 170 virtual void Resume() = 0; |
| 170 | 171 |
| 171 // Cancels a navigation that was previously deferred by a NavigationThrottle. | 172 // Cancels a navigation that was previously deferred by a NavigationThrottle. |
| 172 // |result| should be equal to NavigationThrottle::CANCEL or | 173 // |result| should be equal to NavigationThrottle::CANCEL or |
| 173 // NavigationThrottle::CANCEL_AND_IGNORE. | 174 // NavigationThrottle::CANCEL_AND_IGNORE. |
| 174 virtual void CancelDeferredNavigation( | 175 virtual void CancelDeferredNavigation( |
| 175 NavigationThrottle::ThrottleCheckResult result) = 0; | 176 NavigationThrottle::ThrottleCheckResult result) = 0; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 221 |
| 221 // The NavigationData that the embedder returned from | 222 // The NavigationData that the embedder returned from |
| 222 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 223 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
| 223 // be a clone of the NavigationData. | 224 // be a clone of the NavigationData. |
| 224 virtual NavigationData* GetNavigationData() = 0; | 225 virtual NavigationData* GetNavigationData() = 0; |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 } // namespace content | 228 } // namespace content |
| 228 | 229 |
| 229 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 230 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
| OLD | NEW |