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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 virtual const std::vector<GURL>& GetRedirectChain() = 0; | 176 virtual const std::vector<GURL>& GetRedirectChain() = 0; |
177 | 177 |
178 // Whether the navigation has committed. Navigations that end up being | 178 // Whether the navigation has committed. Navigations that end up being |
179 // downloads or return 204/205 response codes do not commit (i.e. the | 179 // downloads or return 204/205 response codes do not commit (i.e. the |
180 // WebContents stays at the existing URL). | 180 // WebContents stays at the existing URL). |
181 // This returns true for either successful commits or error pages that | 181 // This returns true for either successful commits or error pages that |
182 // replace the previous page (distinguished by |IsErrorPage|), and false for | 182 // replace the previous page (distinguished by |IsErrorPage|), and false for |
183 // errors that leave the user on the previous page. | 183 // errors that leave the user on the previous page. |
184 virtual bool HasCommitted() = 0; | 184 virtual bool HasCommitted() = 0; |
185 | 185 |
186 // Whether the navigation request is a download. This is useful when the | |
187 // navigation hasn't committed yet, in which case HasCommitted() will return | |
188 // false even if the navigation request is not a download. | |
189 virtual bool IsDownload() = 0; | |
nasko
2017/03/30 23:15:45
We don't need to expose this method at this time,
meacer
2017/04/05 22:33:28
Done.
| |
190 | |
186 // Whether the navigation resulted in an error page. | 191 // Whether the navigation resulted in an error page. |
187 // Note that if an error page reloads, this will return true even though | 192 // Note that if an error page reloads, this will return true even though |
188 // GetNetErrorCode will be net::OK. | 193 // GetNetErrorCode will be net::OK. |
189 virtual bool IsErrorPage() = 0; | 194 virtual bool IsErrorPage() = 0; |
190 | 195 |
191 // Not all committed subframe navigations (i.e., !IsInMainFrame && | 196 // Not all committed subframe navigations (i.e., !IsInMainFrame && |
192 // HasCommitted) end up causing a change of the current NavigationEntry. For | 197 // HasCommitted) end up causing a change of the current NavigationEntry. For |
193 // example, some users of NavigationHandle may want to ignore the initial | 198 // example, some users of NavigationHandle may want to ignore the initial |
194 // commit in a newly added subframe or location.replace events in subframes | 199 // commit in a newly added subframe or location.replace events in subframes |
195 // (e.g., ads), while still reacting to user actions like link clicks and | 200 // (e.g., ads), while still reacting to user actions like link clicks and |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 | 300 |
296 // The NavigationData that the embedder returned from | 301 // The NavigationData that the embedder returned from |
297 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 302 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
298 // be a clone of the NavigationData. | 303 // be a clone of the NavigationData. |
299 virtual NavigationData* GetNavigationData() = 0; | 304 virtual NavigationData* GetNavigationData() = 0; |
300 }; | 305 }; |
301 | 306 |
302 } // namespace content | 307 } // namespace content |
303 | 308 |
304 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 309 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |