Commit 6ff51a17 authored by abarth@webkit.org's avatar abarth@webkit.org

2009-10-01 Adam Barth <abarth@webkit.org>

        Reviewed by Darin Adler.

        Move RedirectScheduler to its own file
        https://bugs.webkit.org/show_bug.cgi?id=29952

        This change is purely code motion.

        No behavior change.

        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * loader/FrameLoader.cpp:
        * loader/FrameLoader.h:
        * loader/RedirectScheduler.cpp: Added.
        (WebCore::ScheduledRedirection::):
        (WebCore::ScheduledRedirection::ScheduledRedirection):
        (WebCore::RedirectScheduler::RedirectScheduler):
        (WebCore::RedirectScheduler::~RedirectScheduler):
        (WebCore::RedirectScheduler::redirectScheduledDuringLoad):
        (WebCore::RedirectScheduler::clear):
        (WebCore::RedirectScheduler::scheduleRedirect):
        (WebCore::RedirectScheduler::mustLockBackForwardList):
        (WebCore::RedirectScheduler::scheduleLocationChange):
        (WebCore::RedirectScheduler::scheduleFormSubmission):
        (WebCore::RedirectScheduler::scheduleRefresh):
        (WebCore::RedirectScheduler::locationChangePending):
        (WebCore::RedirectScheduler::scheduleHistoryNavigation):
        (WebCore::RedirectScheduler::timerFired):
        (WebCore::RedirectScheduler::schedule):
        (WebCore::RedirectScheduler::startTimer):
        (WebCore::RedirectScheduler::cancel):
        * loader/RedirectScheduler.h: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 28e2b6e1
2009-10-01 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
Move RedirectScheduler to its own file
https://bugs.webkit.org/show_bug.cgi?id=29952
This change is purely code motion.
No behavior change.
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreSources.bkl:
* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
* loader/RedirectScheduler.cpp: Added.
(WebCore::ScheduledRedirection::):
(WebCore::ScheduledRedirection::ScheduledRedirection):
(WebCore::RedirectScheduler::RedirectScheduler):
(WebCore::RedirectScheduler::~RedirectScheduler):
(WebCore::RedirectScheduler::redirectScheduledDuringLoad):
(WebCore::RedirectScheduler::clear):
(WebCore::RedirectScheduler::scheduleRedirect):
(WebCore::RedirectScheduler::mustLockBackForwardList):
(WebCore::RedirectScheduler::scheduleLocationChange):
(WebCore::RedirectScheduler::scheduleFormSubmission):
(WebCore::RedirectScheduler::scheduleRefresh):
(WebCore::RedirectScheduler::locationChangePending):
(WebCore::RedirectScheduler::scheduleHistoryNavigation):
(WebCore::RedirectScheduler::timerFired):
(WebCore::RedirectScheduler::schedule):
(WebCore::RedirectScheduler::startTimer):
(WebCore::RedirectScheduler::cancel):
* loader/RedirectScheduler.h: Added.
2009-10-02 Dave MacLachlan <dmaclach@gmail.com>
Reviewed by David Levin.
......@@ -97,7 +136,7 @@
* WebCore.xcodeproj/project.pbxproj:
2009-10-01 Adam Barth <abarth@webkit.org>
2009-09-30 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
......@@ -1244,6 +1244,8 @@ webcore_sources += \
WebCore/loader/PluginDocument.h \
WebCore/loader/ProgressTracker.cpp \
WebCore/loader/ProgressTracker.h \
WebCore/loader/RedirectScheduler.cpp \
WebCore/loader/RedirectScheduler.h \
WebCore/loader/Request.cpp \
WebCore/loader/Request.h \
WebCore/loader/ResourceLoader.cpp \
......
......@@ -1628,6 +1628,8 @@
'loader/PluginDocument.h',
'loader/ProgressTracker.cpp',
'loader/ProgressTracker.h',
'loader/RedirectScheduler.cpp',
'loader/RedirectScheduler.h',
'loader/Request.cpp',
'loader/Request.h',
'loader/ResourceLoader.cpp',
......
......@@ -1107,6 +1107,7 @@ SOURCES += \
loader/PlaceholderDocument.cpp \
loader/PluginDocument.cpp \
loader/ProgressTracker.cpp \
loader/RedirectScheduler.cpp \
loader/Request.cpp \
loader/ResourceLoader.cpp \
loader/SubresourceLoader.cpp \
......
......@@ -17448,6 +17448,14 @@
RelativePath="..\loader\ProgressTracker.h"
>
</File>
<File
RelativePath="..\loader\RedirectScheduler.cpp"
>
</File>
<File
RelativePath="..\loader\RedirectScheduler.h"
>
</File>
<File
RelativePath="..\loader\Request.cpp"
>
......
......@@ -2344,6 +2344,8 @@
93F9B7A00BA6032600854064 /* JSCDATASection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F9B79E0BA6032600854064 /* JSCDATASection.cpp */; };
93F9B7A10BA6032600854064 /* JSCDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F9B79F0BA6032600854064 /* JSCDATASection.h */; };
93FDAFCA0B11307400E2746F /* EditorInsertAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FDAFC90B11307400E2746F /* EditorInsertAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
979F43D31075E44A0000F83B /* RedirectScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 979F43D11075E44A0000F83B /* RedirectScheduler.cpp */; };
979F43D41075E44A0000F83B /* RedirectScheduler.h in Headers */ = {isa = PBXBuildFile; fileRef = 979F43D21075E44A0000F83B /* RedirectScheduler.h */; };
97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */; };
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */; };
A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
......@@ -7522,6 +7524,8 @@
93F9B79E0BA6032600854064 /* JSCDATASection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCDATASection.cpp; sourceTree = "<group>"; };
93F9B79F0BA6032600854064 /* JSCDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCDATASection.h; sourceTree = "<group>"; };
93FDAFC90B11307400E2746F /* EditorInsertAction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EditorInsertAction.h; sourceTree = "<group>"; };
979F43D11075E44A0000F83B /* RedirectScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RedirectScheduler.cpp; sourceTree = "<group>"; };
979F43D21075E44A0000F83B /* RedirectScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RedirectScheduler.h; sourceTree = "<group>"; };
97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSSAuditor.cpp; sourceTree = "<group>"; };
97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSSAuditor.h; sourceTree = "<group>"; };
A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; };
......@@ -14561,6 +14565,8 @@
1AC694C60A3B1676003F5049 /* PluginDocument.h */,
1A2A68210B5BEDE70002A480 /* ProgressTracker.cpp */,
1A2A68220B5BEDE70002A480 /* ProgressTracker.h */,
979F43D11075E44A0000F83B /* RedirectScheduler.cpp */,
979F43D21075E44A0000F83B /* RedirectScheduler.h */,
BCB16C150979C3BD00467741 /* Request.cpp */,
BCB16C160979C3BD00467741 /* Request.h */,
93E227DE0AF589AD00D48324 /* ResourceLoader.cpp */,
......@@ -17925,6 +17931,7 @@
BCACF3BD1072921A00C0C8A3 /* UserContentURLPattern.h in Headers */,
5DB1BC6A10715A6400EFAA49 /* TransformSource.h in Headers */,
930FC68A1072B9280045293E /* TextRenderingMode.h in Headers */,
979F43D41075E44A0000F83B /* RedirectScheduler.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -20041,6 +20048,7 @@
7693BAD3106C2DCA007B0823 /* PluginHalter.cpp in Sources */,
BCACF3BC1072921A00C0C8A3 /* UserContentURLPattern.cpp in Sources */,
5DB1BC6B10715A6400EFAA49 /* TransformSourceLibxslt.cpp in Sources */,
979F43D31075E44A0000F83B /* RedirectScheduler.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -728,6 +728,7 @@ This file contains the list of files needed to build WebCore.
loader/PlaceholderDocument.cpp
loader/PluginDocument.cpp
loader/ProgressTracker.cpp
loader/RedirectScheduler.cpp
loader/Request.cpp
loader/ResourceLoader.cpp
loader/SubresourceLoader.cpp
......
This diff is collapsed.
......@@ -32,6 +32,7 @@
#include "CachePolicy.h"
#include "FrameLoaderTypes.h"
#include "RedirectScheduler.h"
#include "ResourceRequest.h"
#include "ThreadableLoader.h"
#include "Timer.h"
......@@ -72,7 +73,6 @@ namespace WebCore {
class Widget;
struct FrameLoadRequest;
struct ScheduledRedirection;
struct WindowFeatures;
bool isBackForwardLoadType(FrameLoadType);
......@@ -112,36 +112,6 @@ namespace WebCore {
void* m_argument;
};
class RedirectScheduler : public Noncopyable {
public:
RedirectScheduler(Frame*);
~RedirectScheduler();
bool redirectScheduledDuringLoad();
bool locationChangePending();
void scheduleRedirect(double delay, const String& url);
void scheduleLocationChange(const String& url, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool userGesture = false);
void scheduleFormSubmission(const FrameLoadRequest&, bool lockHistory, PassRefPtr<Event>, PassRefPtr<FormState>);
void scheduleRefresh(bool userGesture = false);
void scheduleHistoryNavigation(int steps);
void startTimer();
void cancel(bool newLoadInProgress = false);
void clear();
private:
void timerFired(Timer<RedirectScheduler>*);
void schedule(PassOwnPtr<ScheduledRedirection> redirection);
static bool mustLockBackForwardList(Frame* targetFrame);
Frame* m_frame;
Timer<RedirectScheduler> m_timer;
OwnPtr<ScheduledRedirection> m_scheduledRedirection;
};
class FrameLoader : public Noncopyable {
public:
FrameLoader(Frame*, FrameLoaderClient*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment