diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/loader/NavigationScheduler.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/loader/NavigationScheduler.h')
-rw-r--r-- | Source/WebCore/loader/NavigationScheduler.h | 41 |
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 |