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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // handlers. | 114 // handlers. |
115 virtual bool IsExternalProtocol() = 0; | 115 virtual bool IsExternalProtocol() = 0; |
116 | 116 |
117 // Navigation control flow -------------------------------------------------- | 117 // Navigation control flow -------------------------------------------------- |
118 | 118 |
119 // The net error code if an error happened prior to commit. Otherwise it will | 119 // The net error code if an error happened prior to commit. Otherwise it will |
120 // be net::OK. | 120 // be net::OK. |
121 virtual net::Error GetNetErrorCode() = 0; | 121 virtual net::Error GetNetErrorCode() = 0; |
122 | 122 |
123 // Returns the RenderFrameHost this navigation is taking place in. This can | 123 // Returns the RenderFrameHost this navigation is taking place in. This can |
124 // only be accessed after the navigation is ready to commit. | 124 // only be accessed after the response has been received, i.e. in the |
| 125 // WILL_PROCESS_RESPONSE state or later. |
125 virtual RenderFrameHost* GetRenderFrameHost() = 0; | 126 virtual RenderFrameHost* GetRenderFrameHost() = 0; |
126 | 127 |
127 // Whether the navigation happened in the same page. This is only known | 128 // Whether the navigation happened in the same page. This is only known |
128 // after the navigation has committed. It is an error to call this method | 129 // after the navigation has committed. It is an error to call this method |
129 // before the navigation has committed. | 130 // before the navigation has committed. |
130 virtual bool IsSamePage() = 0; | 131 virtual bool IsSamePage() = 0; |
131 | 132 |
132 // Whether the navigation has encountered a server redirect or not. | 133 // Whether the navigation has encountered a server redirect or not. |
133 virtual bool WasServerRedirect() = 0; | 134 virtual bool WasServerRedirect() = 0; |
134 | 135 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 186 |
186 // The NavigationData that the embedder returned from | 187 // The NavigationData that the embedder returned from |
187 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 188 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
188 // be a clone of the NavigationData. | 189 // be a clone of the NavigationData. |
189 virtual NavigationData* GetNavigationData() = 0; | 190 virtual NavigationData* GetNavigationData() = 0; |
190 }; | 191 }; |
191 | 192 |
192 } // namespace content | 193 } // namespace content |
193 | 194 |
194 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 195 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |