Allow LoaderStrategy to override the ResourceLoadScheduler
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2012 17:16:38 +0000 (17:16 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Oct 2012 17:16:38 +0000 (17:16 +0000)
commitc2a06e8f704500961226d30a317aa247ab76645d
treef5b431c8af9b5b21d4dcff13d37e8a2c2e86eaa8
parent1fd4e861eeb97e4393dd6b7d654c87e8bc0ffe72
Allow LoaderStrategy to override the ResourceLoadScheduler
https://bugs.webkit.org/show_bug.cgi?id=100355

Reviewed by Anders Carlsson.

Source/WebCore:

Allow LoaderStrategy to override the implementation of the ResourceLoadScheduler.
Add a default implementation that just returns the current ResourceLoadScheduler.

No new tests (No behavior change).

Project file stuff:
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:

"Virtualize" ResourceLoadScheduler to expose build issues in preparation for future virtualization:
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::~ResourceLoadScheduler):
* loader/ResourceLoadScheduler.h:
(ResourceLoadScheduler):

Add the new method plus a default implementation:
 * loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::resourceLoadScheduler):
* loader/LoaderStrategy.h:

When strategies are enabled, use the LoaderStrategy for this:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::suspendPostAttachCallbacks):
(WebCore::ContainerNode::resumePostAttachCallbacks):

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::loadNow):

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::releaseResources):
(WebCore::ResourceLoader::willSendRequest):

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::performPostLoadActions):

Source/WebKit2:

Add a WebKit2 subclass of ResourceLoadScheduler that currently adds no new functionality:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::~WebResourceLoadScheduler):
* WebProcess/Network/WebResourceLoadScheduler.h:

WebProcess hangs on to the default shared WebResourceLoadScheduler:
* WebProcess/WebProcess.h:
(WebKit::WebProcess::webResourceLoadScheduler):

If the NetworkProcess is enabled, return the new WebResourceLoadScheduler:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::resourceLoadScheduler):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@132501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/loader/LoaderStrategy.cpp [new file with mode: 0644]
Source/WebCore/loader/LoaderStrategy.h
Source/WebCore/loader/MainResourceLoader.cpp
Source/WebCore/loader/ResourceLoadScheduler.cpp
Source/WebCore/loader/ResourceLoadScheduler.h
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.h [new file with mode: 0644]
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit2/WebProcess/WebProcess.h