Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1508)

Unified Diff: content/public/browser/navigation_handle.h

Issue 1667163002: Add methods to NavigationHandle to allow refactoring webNavigation to use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Camille's review. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/public/browser/navigation_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/navigation_handle.h
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h
index 8d0c6d98a2e7fb3c0d41e0292a3c592a8df25bc4..f8a3b5e02fda3d45e37658e55253a77c4d3740bf 100644
--- a/content/public/browser/navigation_handle.h
+++ b/content/public/browser/navigation_handle.h
@@ -41,6 +41,29 @@ class CONTENT_EXPORT NavigationHandle {
// This remains constant over the navigation lifetime.
virtual bool IsInMainFrame() = 0;
+ // Whether the navigation is taking place in a frame that is a direct child
+ // of the main frame. This remains constant over the navigation lifetime.
+ virtual bool IsParentMainFrame() = 0;
+
+ // Whether the navigation is synchronous or not. Examples of synchronous
+ // navigations are:
+ // * reference fragment navigations
+ // * pushState/popState
+ virtual bool IsSynchronousNavigation() = 0;
+
+ // Whether the navigation is for an iframe with srcdoc attribute.
+ virtual bool IsSrcdoc() = 0;
+
+ // Returns the FrameTreeNode ID for the frame in which the navigation is
+ // performed. This ID is browser-global and uniquely identifies a frame that
+ // hosts content. The identifier is fixed at the creation of the frame and
+ // stays constant for the lifetime of the frame.
+ virtual int GetFrameTreeNodeId() = 0;
+
+ // Returns the FrameTreeNode ID for the parent frame. If this navigation is
+ // taking place in the main frame, the value returned is -1.
+ virtual int GetParentFrameTreeNodeId() = 0;
+
// The WebContents the navigation is taking place in.
WebContents* GetWebContents();
@@ -90,6 +113,9 @@ class CONTENT_EXPORT NavigationHandle {
// before the navigation has committed.
virtual bool IsSamePage() = 0;
+ // Whether the navigation has encountered a server redirect or not.
+ virtual bool WasServerRedirect() = 0;
+
// Whether the navigation has committed. This returns true for either
// successful commits or error pages that replace the previous page
// (distinguished by |IsErrorPage|), and false for errors that leave the user
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/public/browser/navigation_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698