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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.h

Issue 2694013005: Cleanup blink-side PlzNavigate logic (Closed)
Patch Set: Rebase Created 3 years, 9 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
Index: third_party/WebKit/Source/core/loader/FrameLoader.h
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.h b/third_party/WebKit/Source/core/loader/FrameLoader.h
index 30988a2e17a4a91d05bbd853c9e2b65a2788c8e0..1b3ab0e89d7401804f82b267f19f45e7dcbfe7d6 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.h
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.h
@@ -202,23 +202,23 @@ class CORE_EXPORT FrameLoader final {
void restoreScrollPositionAndViewState();
- bool shouldContinueForNavigationPolicy(const ResourceRequest&,
- const SubstituteData&,
- DocumentLoader*,
- ContentSecurityPolicyDisposition,
- NavigationType,
- NavigationPolicy,
- FrameLoadType,
- bool isClientRedirect,
- HTMLFormElement*);
-
- // PlzNavigate: Navigations handled by the client are treated as
- // provisional navigations.
- bool hasProvisionalNavigation() const {
- return provisionalDocumentLoader() || m_isNavigationHandledByClient;
- }
+ // The navigation should only be continued immediately in this frame if this
+ // returns NavigationPolicyCurrentTab.
+ NavigationPolicy shouldContinueForNavigationPolicy(
+ const ResourceRequest&,
+ const SubstituteData&,
+ DocumentLoader*,
+ ContentSecurityPolicyDisposition,
+ NavigationType,
+ NavigationPolicy,
+ FrameLoadType,
+ bool isClientRedirect,
+ HTMLFormElement*);
- void clearNavigationHandledByClient();
+ // Note: When a PlzNavigtate navigation is handled by the client, we will
+ // have created a dummy provisional DocumentLoader, so this will return true
+ // while the client handles the navigation.
+ bool hasProvisionalNavigation() const { return provisionalDocumentLoader(); }
DECLARE_TRACE();
@@ -238,10 +238,10 @@ class CORE_EXPORT FrameLoader final {
const KURL&);
void processFragment(const KURL&, FrameLoadType, LoadStartType);
- bool checkLoadCanStart(FrameLoadRequest&,
- FrameLoadType,
- NavigationPolicy,
- NavigationType);
+ NavigationPolicy checkLoadCanStart(FrameLoadRequest&,
+ FrameLoadType,
+ NavigationPolicy,
+ NavigationType);
void startLoad(FrameLoadRequest&, FrameLoadType, NavigationPolicy);
enum class HistoryNavigationType { DifferentDocument, Fragment, HistoryApi };
@@ -271,8 +271,6 @@ class CORE_EXPORT FrameLoader final {
FrameLoadType,
NavigationType);
- void setNavigationHandledByClient();
-
Member<LocalFrame> m_frame;
AtomicString m_requiredCSP;
@@ -333,7 +331,6 @@ class CORE_EXPORT FrameLoader final {
bool m_dispatchingDidClearWindowObjectInMainWorld;
bool m_protectProvisionalLoader;
- bool m_isNavigationHandledByClient;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698