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

Side by Side Diff: content/public/browser/navigation_handle.h

Issue 2345053006: Remove IsSynchronous API from NavigationHandle. (Closed)
Patch Set: Rebase. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 virtual bool IsParentMainFrame() = 0; 57 virtual bool IsParentMainFrame() = 0;
58 58
59 // Whether the navigation was initated by the renderer process. Examples of 59 // Whether the navigation was initated by the renderer process. Examples of
60 // renderer-initiated navigations include: 60 // renderer-initiated navigations include:
61 // * <a> link click 61 // * <a> link click
62 // * changing window.location.href 62 // * changing window.location.href
63 // * redirect via the <meta http-equiv="refresh"> tag 63 // * redirect via the <meta http-equiv="refresh"> tag
64 // * using window.history.pushState 64 // * using window.history.pushState
65 virtual bool IsRendererInitiated() = 0; 65 virtual bool IsRendererInitiated() = 0;
66 66
67 // Whether the navigation is synchronous or not. Examples of synchronous
68 // navigations are:
69 // * reference fragment navigations
70 // * pushState/popState
71 virtual bool IsSynchronousNavigation() = 0;
72
73 // Whether the navigation is for an iframe with srcdoc attribute. 67 // Whether the navigation is for an iframe with srcdoc attribute.
74 virtual bool IsSrcdoc() = 0; 68 virtual bool IsSrcdoc() = 0;
75 69
76 // Returns the FrameTreeNode ID for the frame in which the navigation is 70 // Returns the FrameTreeNode ID for the frame in which the navigation is
77 // performed. This ID is browser-global and uniquely identifies a frame that 71 // performed. This ID is browser-global and uniquely identifies a frame that
78 // hosts content. The identifier is fixed at the creation of the frame and 72 // hosts content. The identifier is fixed at the creation of the frame and
79 // stays constant for the lifetime of the frame. 73 // stays constant for the lifetime of the frame.
80 virtual int GetFrameTreeNodeId() = 0; 74 virtual int GetFrameTreeNodeId() = 0;
81 75
82 // Returns the FrameTreeNode ID for the parent frame. If this navigation is 76 // Returns the FrameTreeNode ID for the parent frame. If this navigation is
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 124
131 // Returns the RenderFrameHost this navigation is taking place in. This can 125 // Returns the RenderFrameHost this navigation is taking place in. This can
132 // only be accessed after a response has been delivered for processing. 126 // only be accessed after a response has been delivered for processing.
133 // 127 //
134 // If PlzNavigate is active, the RenderFrameHost returned will be the final 128 // If PlzNavigate is active, the RenderFrameHost returned will be the final
135 // host for the navigation. If PlzNavigate is inactive, the navigation may 129 // host for the navigation. If PlzNavigate is inactive, the navigation may
136 // transfer to a new host up until the point that DidFinishNavigation is 130 // transfer to a new host up until the point that DidFinishNavigation is
137 // called. 131 // called.
138 virtual RenderFrameHost* GetRenderFrameHost() = 0; 132 virtual RenderFrameHost* GetRenderFrameHost() = 0;
139 133
140 // Whether the navigation happened in the same page. This is only known 134 // Whether the navigation happened in the same page. Examples of same page
141 // after the navigation has committed. It is an error to call this method 135 // navigations are:
142 // before the navigation has committed. 136 // * reference fragment navigations
137 // * pushState/replaceState
143 virtual bool IsSamePage() = 0; 138 virtual bool IsSamePage() = 0;
144 139
145 // Whether the navigation has encountered a server redirect or not. 140 // Whether the navigation has encountered a server redirect or not.
146 virtual bool WasServerRedirect() = 0; 141 virtual bool WasServerRedirect() = 0;
147 142
148 // Whether the navigation has committed. This returns true for either 143 // Whether the navigation has committed. This returns true for either
149 // successful commits or error pages that replace the previous page 144 // successful commits or error pages that replace the previous page
150 // (distinguished by |IsErrorPage|), and false for errors that leave the user 145 // (distinguished by |IsErrorPage|), and false for errors that leave the user
151 // on the previous page. 146 // on the previous page.
152 virtual bool HasCommitted() = 0; 147 virtual bool HasCommitted() = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 212
218 // The NavigationData that the embedder returned from 213 // The NavigationData that the embedder returned from
219 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will 214 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
220 // be a clone of the NavigationData. 215 // be a clone of the NavigationData.
221 virtual NavigationData* GetNavigationData() = 0; 216 virtual NavigationData* GetNavigationData() = 0;
222 }; 217 };
223 218
224 } // namespace content 219 } // namespace content
225 220
226 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 221 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698