summaryrefslogtreecommitdiff
path: root/Source/WebCore/loader/NavigationScheduler.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/loader/NavigationScheduler.h')
-rw-r--r--Source/WebCore/loader/NavigationScheduler.h41
1 files changed, 18 insertions, 23 deletions
diff --git a/Source/WebCore/loader/NavigationScheduler.h b/Source/WebCore/loader/NavigationScheduler.h
index 78756d6cf..a2a0b94d9 100644
--- a/Source/WebCore/loader/NavigationScheduler.h
+++ b/Source/WebCore/loader/NavigationScheduler.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2017 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
* Copyright (C) 2009 Adam Barth. All rights reserved.
*
@@ -12,7 +12,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -28,30 +28,28 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NavigationScheduler_h
-#define NavigationScheduler_h
+#pragma once
+#include "FrameLoaderTypes.h"
#include "Timer.h"
#include <wtf/Forward.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/PassRefPtr.h>
namespace WebCore {
+class Document;
class FormSubmission;
class Frame;
class ScheduledNavigation;
class SecurityOrigin;
+class URL;
-class NavigationDisablerForBeforeUnload {
- WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload);
-
+class NavigationDisabler {
public:
- NavigationDisablerForBeforeUnload()
+ NavigationDisabler()
{
s_navigationDisableCount++;
}
- ~NavigationDisablerForBeforeUnload()
+ ~NavigationDisabler()
{
ASSERT(s_navigationDisableCount);
s_navigationDisableCount--;
@@ -63,8 +61,6 @@ private:
};
class NavigationScheduler {
- WTF_MAKE_NONCOPYABLE(NavigationScheduler);
-
public:
explicit NavigationScheduler(Frame&);
~NavigationScheduler();
@@ -72,11 +68,12 @@ public:
bool redirectScheduledDuringLoad();
bool locationChangePending();
- void scheduleRedirect(double delay, const String& url);
- void scheduleLocationChange(SecurityOrigin*, const String& url, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true);
- void scheduleFormSubmission(PassRefPtr<FormSubmission>);
- void scheduleRefresh();
+ void scheduleRedirect(Document& initiatingDocument, double delay, const URL&);
+ void scheduleLocationChange(Document& initiatingDocument, SecurityOrigin&, const URL&, const String& referrer, LockHistory = LockHistory::Yes, LockBackForwardList = LockBackForwardList::Yes);
+ void scheduleFormSubmission(Ref<FormSubmission>&&);
+ void scheduleRefresh(Document& initiatingDocument);
void scheduleHistoryNavigation(int steps);
+ void schedulePageBlock(Document& originDocument);
void startTimer();
@@ -85,18 +82,16 @@ public:
private:
bool shouldScheduleNavigation() const;
- bool shouldScheduleNavigation(const String& url) const;
+ bool shouldScheduleNavigation(const URL&) const;
- void timerFired(Timer<NavigationScheduler>&);
+ void timerFired();
void schedule(std::unique_ptr<ScheduledNavigation>);
- static bool mustLockBackForwardList(Frame& targetFrame);
+ static LockBackForwardList mustLockBackForwardList(Frame& targetFrame);
Frame& m_frame;
- Timer<NavigationScheduler> m_timer;
+ Timer m_timer;
std::unique_ptr<ScheduledNavigation> m_redirect;
};
} // namespace WebCore
-
-#endif // NavigationScheduler_h