Stop using Connection::deprecatedSend in WebConnection
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 04:41:14 +0000 (04:41 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Oct 2012 04:41:14 +0000 (04:41 +0000)
commitaa9e7152bc02e5461cfc56e149b69d224999b937
treef3a52d1fcfb6172d34a02aae18ccc277b7e97c0c
parent7ff52255416d323a5baf2e73dfc8d20c81413a54
Stop using Connection::deprecatedSend in WebConnection
https://bugs.webkit.org/show_bug.cgi?id=99130

Reviewed by Sam Weinig.

Instead of using deprecatedSend, just encode the data using a separate ArgumentEncoder and pass it along as a DataReference.

* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
Add new files.

* Platform/CoreIPC/MessageID.h:
Add WebConnectionMessageClass.

* Shared/WebConnection.cpp:
(WebKit::WebConnection::WebConnection):
Make WebConnection hold on to the CoreIPC::Connection.

(WebKit::WebConnection::postMessage):
Ask the subclasses to encode the body data, then send it.

(WebKit::WebConnection::handleMessage):
Ask the subclasses to decode the body data, then call didReceiveClient.

(WebKit::WebConnection::invalidate):
Null out m_connection.

* Shared/WebConnection.h:
(WebKit::WebConnection::connection):

* Shared/WebConnection.messages.in: Added.

* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
Pass the connection to the WebConnection initializer.

(WebKit::WebConnectionToWebProcess::encodeMessageBody):
(WebKit::WebConnectionToWebProcess::decodeMessageBody):
Encode and decode the message body.

(WebKit::WebConnectionToWebProcess::didReceiveMessage):
Handle WebConnection messages.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
Pass the connection to the WebConnection initializer.

(WebKit::WebConnectionToUIProcess::encodeMessageBody):
(WebKit::WebConnectionToUIProcess::decodeMessageBody):
Encode and decode the message body.

(WebKit::WebConnectionToUIProcess::didReceiveMessage):
Handle WebConnection messages.

* win/WebKit2.vcproj:
Add new files.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/DerivedSources.make
Source/WebKit2/DerivedSources.pri
Source/WebKit2/GNUmakefile.am
Source/WebKit2/GNUmakefile.list.am
Source/WebKit2/Platform/CoreIPC/MessageID.h
Source/WebKit2/Shared/WebConnection.cpp
Source/WebKit2/Shared/WebConnection.h
Source/WebKit2/Shared/WebConnection.messages.in [new file with mode: 0644]
Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
Source/WebKit2/UIProcess/WebConnectionToWebProcess.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebConnectionToUIProcess.cpp
Source/WebKit2/WebProcess/WebConnectionToUIProcess.h
Source/WebKit2/win/WebKit2.vcproj