Patch for https://bugs.webkit.org/show_bug.cgi?id=40940
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jun 2010 21:36:44 +0000 (21:36 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jun 2010 21:36:44 +0000 (21:36 +0000)
commit59f31e0a5209320b085f56208323adf102f77a28
tree21fc6326b9cbd1e68f2a61767ba37267affd0b5b
parent6af7d8875ec14b75bf31e175db2335e19957b984
Patch for https://bugs.webkit.org/show_bug.cgi?id=40940
Add message passing support to the WebKit2 API.

Reviewed by Anders Carlsson.

WebKit2:

Adds message passing for both InjectedBundle -> WebContext
and WebContext -> InjectedBundle.

* Shared/CoreIPCSupport/WebProcessMessageKinds.h:
(WebProcessMessage::):
* Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h: Added.
(WebProcessProxyMessage::):
(CoreIPC::):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetInjectedBundleClient):
(WKContextPostMessageToInjectedBundle):
* UIProcess/API/C/WKContext.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::initializeInjectedBundleClient):
(WebKit::WebContext::forwardMessageToWebContext):
(WebKit::WebContext::postMessageToInjectedBundle):
* UIProcess/WebContext.h:
* UIProcess/WebContextInjectedBundleClient.cpp: Added.
(WebKit::WebContextInjectedBundleClient::WebContextInjectedBundleClient):
(WebKit::WebContextInjectedBundleClient::initialize):
(WebKit::WebContextInjectedBundleClient::didRecieveMessageFromInjectedBundle):
* UIProcess/WebContextInjectedBundleClient.h: Added.
* UIProcess/WebProcessManager.cpp:
(WebKit::WebProcessManager::processDidClose):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveInjectedBundleMessage):
(WebKit::WebProcessProxy::didReceiveMessage):
* UIProcess/WebProcessProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundlePostMessage):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
(WebKit::InjectedBundle::didCreatePage):
(WebKit::InjectedBundle::didRecieveMessage):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::loadInjectedBundle):
(WebKit::WebProcess::forwardMessageToInjectedBundle):
(WebKit::WebProcess::didReceiveMessage):
* WebProcess/WebProcess.h:
* mac/WebKit2.exp:
* win/WebKit2.vcproj:

WebKitTools:

- Add some test messages.

* MiniBrowser/mac/AppDelegate.m:
(_didRecieveMessageFromInjectedBundle):
(-[BrowserAppDelegate init]):
* MiniBrowser/mac/WebBundle/WebBundleMain.m:
(_didClearWindow):
(_didCreatePage):
(_didRecieveMessage):
(WKBundleInitialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
WebKit2/ChangeLog
WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h
WebKit2/Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h [new file with mode: 0644]
WebKit2/UIProcess/API/C/WKContext.cpp
WebKit2/UIProcess/API/C/WKContext.h
WebKit2/UIProcess/WebContext.cpp
WebKit2/UIProcess/WebContext.h
WebKit2/UIProcess/WebContextInjectedBundleClient.cpp [new file with mode: 0644]
WebKit2/UIProcess/WebContextInjectedBundleClient.h [new file with mode: 0644]
WebKit2/UIProcess/WebProcessManager.cpp
WebKit2/UIProcess/WebProcessProxy.cpp
WebKit2/UIProcess/WebProcessProxy.h
WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.h
WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
WebKit2/WebProcess/WebProcess.cpp
WebKit2/WebProcess/WebProcess.h
WebKit2/mac/WebKit2.exp
WebKit2/win/WebKit2.vcproj
WebKitTools/ChangeLog
WebKitTools/MiniBrowser/mac/AppDelegate.m
WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m