Move resource loader messaging from NetworkConnectionToWebProcess directly to Network...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2012 00:40:15 +0000 (00:40 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2012 00:40:15 +0000 (00:40 +0000)
commit1fb4abbbe4629e1fbf618c117955d657d5ca2b86
tree4cdd25242fbba18009382984a3b994795f1e07a2
parentf028fd2fc4930b00f4fe3f6346238b274589f8d9
Move resource loader messaging from NetworkConnectionToWebProcess directly to NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=102570

Reviewed by Alexey Proskuryakov.

This patch adds the ability for WebResourceLoader to message NetworkResourceLoader directly.

This further cements the 1-to-1 relationship between the two classes and makes it easy to add/change
loader related messaging going forward.

Build/infrastructure stuff:
* Platform/CoreIPC/MessageID.h:
* WebKit2.xcodeproj/project.pbxproj:
* DerivedSources.make:

Remove the WillSendRequestHandled message, and forward NetworkResourceLoader messages on to the correct object:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

Hang on to a master map of identifiers to NetworkResourceLoaders:
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleResourceLoad):
(WebKit::NetworkResourceLoadScheduler::removeLoadIdentifier):
(WebKit::NetworkResourceLoadScheduler::networkResourceLoaderForIdentifier):
* NetworkProcess/NetworkResourceLoadScheduler.h:

Change the way "willSendRequestHandled" comes in to be a direct message:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::willSendRequest):
(WebKit::NetworkResourceLoader::willSendRequestHandled):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkResourceLoader.messages.in:

Make WebResourceLoader a MessageSender:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::connection):
(WebKit::WebResourceLoader::destinationID):
(WebKit::WebResourceLoader::willSendRequest): Use MessageSender abilities to message the NetworkResourceLoader.
* WebProcess/Network/WebResourceLoader.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/DerivedSources.make
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h
Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in
Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoadScheduler.h
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
Source/WebKit2/NetworkProcess/NetworkResourceLoader.messages.in [new file with mode: 0644]
Source/WebKit2/Platform/CoreIPC/MessageID.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoader.h