Simplify WebConnection by removing its underlying CoreIPC::Connection
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Nov 2012 05:23:35 +0000 (05:23 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Nov 2012 05:23:35 +0000 (05:23 +0000)
commit6478ac406c2c0ae14516e77d64e70ccd44a1d89d
tree29e0c2b340811d54bbf4dfacb560160c070841d9
parentea96fc9dd55ca9c7dc85313467908ac642b565cb
Simplify WebConnection by removing its underlying CoreIPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=102771

Reviewed by Anders Carlsson.

Instead of having WebConnection subclasses own the CoreIPC::Connection,
move back to having the WebProcess and WebProcessProxy own it (and be
its Connection::Client) and use the new MessageReceiver class to vend
messages to the WebConnection.

* Shared/WebConnection.cpp:
(WebKit::WebConnection::WebConnection):
(WebKit::WebConnection::postMessage):
(WebKit::WebConnection::didClose):
(WebKit::WebConnection::didReceiveMessage):
* Shared/WebConnection.h:
Make WebConnection both a MessageReceiver and MessageSender
and add virtual functions for derived classes to fill in.

* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::create):
(WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
(WebKit::WebConnectionToWebProcess::invalidate):
(WebKit::WebConnectionToWebProcess::decodeMessageBody):
(WebKit::WebConnectionToWebProcess::connection):
(WebKit::WebConnectionToWebProcess::destinationID):
(WebKit::WebConnectionToWebProcess::hasValidConnection):
* UIProcess/WebConnectionToWebProcess.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::fromConnection):
(WebKit::WebProcessProxy::disconnect):
(WebKit::WebProcessProxy::addMessageReceiver):
(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::didReceiveInvalidMessage):
(WebKit::WebProcessProxy::didFinishLaunching):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::connection):
(WebProcessProxy):
(WebKit::WebProcessProxy::webConnection):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::create):
(WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
(WebKit):
(WebKit::WebConnectionToUIProcess::invalidate):
(WebKit::WebConnectionToUIProcess::connection):
(WebKit::WebConnectionToUIProcess::destinationID):
(WebKit::WebConnectionToUIProcess::hasValidConnection):
* WebProcess/WebConnectionToUIProcess.h:
(WebConnectionToUIProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initialize):
(WebKit::WebProcess::terminate):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::connection):
(WebKit::WebProcess::webConnectionToUIProcess):
Move the CoreIPC::Connection back to the processes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebConnection.cpp
Source/WebKit2/Shared/WebConnection.h
Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
Source/WebKit2/UIProcess/WebConnectionToWebProcess.h
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.h
Source/WebKit2/WebProcess/WebConnectionToUIProcess.cpp
Source/WebKit2/WebProcess/WebConnectionToUIProcess.h
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h