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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 // * redirect via the <meta http-equiv="refresh"> tag | 75 // * redirect via the <meta http-equiv="refresh"> tag |
76 // * using window.history.pushState | 76 // * using window.history.pushState |
77 virtual bool IsRendererInitiated() = 0; | 77 virtual bool IsRendererInitiated() = 0; |
78 | 78 |
79 // Returns the FrameTreeNode ID for the frame in which the navigation is | 79 // Returns the FrameTreeNode ID for the frame in which the navigation is |
80 // performed. This ID is browser-global and uniquely identifies a frame that | 80 // performed. This ID is browser-global and uniquely identifies a frame that |
81 // hosts content. The identifier is fixed at the creation of the frame and | 81 // hosts content. The identifier is fixed at the creation of the frame and |
82 // stays constant for the lifetime of the frame. | 82 // stays constant for the lifetime of the frame. |
83 virtual int GetFrameTreeNodeId() = 0; | 83 virtual int GetFrameTreeNodeId() = 0; |
84 | 84 |
85 // Returns the FrameTreeNode ID for the parent frame. If this navigation is | 85 // Returns the RenderFrameHost for the parent frame, or nullptr if this |
86 // taking place in the main frame, the value returned is -1. | 86 // navigation is taking place in the main frame. This value will not change |
87 virtual int GetParentFrameTreeNodeId() = 0; | 87 // during a navigation. |
88 virtual RenderFrameHost* GetParentFrame() = 0; | |
Devlin
2017/05/02 02:04:29
If we were worried before about callers storing th
Charlie Reis
2017/05/04 16:29:58
Yes, since the parent RenderFrameHost doesn't chan
| |
88 | 89 |
89 // The WebContents the navigation is taking place in. | 90 // The WebContents the navigation is taking place in. |
90 WebContents* GetWebContents(); | 91 WebContents* GetWebContents(); |
91 | 92 |
92 // The time the navigation started, recorded either in the renderer or in the | 93 // The time the navigation started, recorded either in the renderer or in the |
93 // browser process. Corresponds to Navigation Timing API. | 94 // browser process. Corresponds to Navigation Timing API. |
94 virtual const base::TimeTicks& NavigationStart() = 0; | 95 virtual const base::TimeTicks& NavigationStart() = 0; |
95 | 96 |
96 // Whether or not the navigation was started within a context menu. | 97 // Whether or not the navigation was started within a context menu. |
97 virtual bool WasStartedFromContextMenu() const = 0; | 98 virtual bool WasStartedFromContextMenu() const = 0; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 | 296 |
296 // The NavigationData that the embedder returned from | 297 // The NavigationData that the embedder returned from |
297 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will | 298 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will |
298 // be a clone of the NavigationData. | 299 // be a clone of the NavigationData. |
299 virtual NavigationData* GetNavigationData() = 0; | 300 virtual NavigationData* GetNavigationData() = 0; |
300 }; | 301 }; |
301 | 302 |
302 } // namespace content | 303 } // namespace content |
303 | 304 |
304 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ | 305 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ |
OLD | NEW |