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

Unified Diff: Source/core/loader/NavigationScheduler.cpp

Issue 1309883003: Add hooks for capturing meaningful text info, gently. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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: Source/core/loader/NavigationScheduler.cpp
diff --git a/Source/core/loader/NavigationScheduler.cpp b/Source/core/loader/NavigationScheduler.cpp
index ede1efdeac3bf0283535af9a9279cbce220204b3..31930fa631041094236e819a837eb26d1dd57c09 100644
--- a/Source/core/loader/NavigationScheduler.cpp
+++ b/Source/core/loader/NavigationScheduler.cpp
@@ -88,6 +88,7 @@ public:
Document* originDocument() const { return m_originDocument.get(); }
bool replacesCurrentItem() const { return m_replacesCurrentItem; }
bool isLocationChange() const { return m_isLocationChange; }
+ virtual bool isRedirect() const { return false; }
PassOwnPtr<UserGestureIndicator> createUserGestureIndicator()
{
if (m_wasUserGesture && m_userGestureToken)
@@ -158,6 +159,9 @@ public:
request.setClientRedirect(ClientRedirect);
frame->loader().load(request);
}
+
+ bool isRedirect() const override { return true; }
+
private:
ScheduledRedirect(double delay, Document* originDocument, const String& url, bool replacesCurrentItem)
: ScheduledURLNavigation(delay, originDocument, url, replacesCurrentItem, false)
@@ -279,6 +283,11 @@ bool NavigationScheduler::locationChangePending()
return m_redirect && m_redirect->isLocationChange();
}
+bool NavigationScheduler::isRedirect() const
+{
+ return m_redirect && m_redirect->isRedirect();
+}
+
inline bool NavigationScheduler::shouldScheduleReload() const
{
return m_frame->page() && isFrameNavigationAllowed() && NavigationDisablerForBeforeUnload::isNavigationAllowed();

Powered by Google App Engine
This is Rietveld 408576698