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 29 matching lines...) Expand all Loading... |
40 virtual const GURL& GetURL() = 0; | 40 virtual const GURL& GetURL() = 0; |
41 | 41 |
42 // Whether the navigation is taking place in the main frame or in a subframe. | 42 // Whether the navigation is taking place in the main frame or in a subframe. |
43 // This remains constant over the navigation lifetime. | 43 // This remains constant over the navigation lifetime. |
44 virtual bool IsInMainFrame() = 0; | 44 virtual bool IsInMainFrame() = 0; |
45 | 45 |
46 // Whether the navigation is taking place in a frame that is a direct child | 46 // Whether the navigation is taking place in a frame that is a direct child |
47 // of the main frame. This remains constant over the navigation lifetime. | 47 // of the main frame. This remains constant over the navigation lifetime. |
48 virtual bool IsParentMainFrame() = 0; | 48 virtual bool IsParentMainFrame() = 0; |
49 | 49 |
| 50 // Whether the navigation was initated by the renderer process. Examples of |
| 51 // renderer-initiated navigations include: |
| 52 // * <a> link click |
| 53 // * changing window.location.href |
| 54 // * redirect via the <meta http-equiv="refresh"> tag |
| 55 // * using window.history.pushState |
| 56 virtual bool IsRendererInitiated() = 0; |
| 57 |
50 // Whether the navigation is synchronous or not. Examples of synchronous | 58 // Whether the navigation is synchronous or not. Examples of synchronous |
51 // navigations are: | 59 // navigations are: |
52 // * reference fragment navigations | 60 // * reference fragment navigations |
53 // * pushState/popState | 61 // * pushState/popState |
54 virtual bool IsSynchronousNavigation() = 0; | 62 virtual bool IsSynchronousNavigation() = 0; |
55 | 63 |
56 // Whether the navigation is for an iframe with srcdoc attribute. | 64 // Whether the navigation is for an iframe with srcdoc attribute. |
57 virtual bool IsSrcdoc() = 0; | 65 virtual bool IsSrcdoc() = 0; |
58 | 66 |
59 // Returns the FrameTreeNode ID for the frame in which the navigation is | 67 // Returns the FrameTreeNode ID for the frame in which the navigation is |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 virtual NavigationThrottle::ThrottleCheckResult | 174 virtual NavigationThrottle::ThrottleCheckResult |
167 CallWillRedirectRequestForTesting(const GURL& new_url, | 175 CallWillRedirectRequestForTesting(const GURL& new_url, |
168 bool new_method_is_post, | 176 bool new_method_is_post, |
169 const GURL& new_referrer_url, | 177 const GURL& new_referrer_url, |
170 bool new_is_external_protocol) = 0; | 178 bool new_is_external_protocol) = 0; |
171 }; | 179 }; |
172 | 180 |
173 } // namespace content | 181 } // namespace content |
174 | 182 |
175 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 183 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |