Use UserData when sending messages to the process pool
https://bugs.webkit.org/show_bug.cgi?id=139978

Reviewed by Sam Weinig.

* Scripts/webkit/messages.py:
(generate_message_handler):
Include the connection parameter for legacy receivers as well.

* Shared/CoreIPCSupport/WebContextMessageKinds.h:
Remove this, it's no longer needed.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveMessage):
No need to special case the postMessage message.

(WebKit::WebProcessPool::didReceiveSyncMessage):
No need to special case the postSynchronousMessageMessage message.

(WebKit::WebProcessPool::handleMessage):
Convert handles to objects and call didReceiveMessageFromInjectedBundle.

(WebKit::WebProcessPool::handleSynchronousMessage):
Convert handles to objects, call didReceiveSynchronousMessageFromInjectedBundle, and then
convert objects back to handles in the reply.

(WebKit::WebProcessPool::didReceiveMessageFromInjectedBundle): Deleted.
(WebKit::WebProcessPool::didReceiveSynchronousMessageFromInjectedBundle): Deleted.
(WebKit::WebProcessPool::dummy): Deleted.
* UIProcess/WebProcessPool.h:
Add handleMessage and handleSynchronousMessage message handlers.

* UIProcess/WebProcessPool.messages.in:
Add new messages.

* WebKit2.xcodeproj/project.pbxproj:
Remove a now unused file.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
Convert objects to handles in the message body and then send the HandleMessage to the UI process.

(WebKit::InjectedBundle::postSynchronousMessage):
Convert objects to handles in the message body, send the HandleSynchronousMessage message to the UI process,
and then convert handles back to objects in the reply.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use UserData for bundle initialization data
https://bugs.webkit.org/show_bug.cgi?id=139989

Reviewed by Sam Weinig.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::~WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Pasteboard code out of WebProcessPool and into its own singleton class
https://bugs.webkit.org/show_bug.cgi?id=139987

Reviewed by Anders Carlsson.

* DerivedSources.make:
* Shared/WebPasteboardProxy.cpp: Added.
(WebKit::WebPasteboardProxy::shared):
(WebKit::WebPasteboardProxy::WebPasteboardProxy):
(WebKit::WebPasteboardProxy::addWebProcessProxy):
* Shared/WebPasteboardProxy.h: Added.
* Shared/WebPasteboardProxy.messages.in: Added.
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm: Added.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveSyncMessage):
(WebKit::WebProcessPool::dummy): Deleted.
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert all variadic WebProcessProxy message over to UserData
https://bugs.webkit.org/show_bug.cgi?id=139990

Reviewed by Sam Weinig.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
(WebKit::WebPageProxy::unableToImplementPolicy):
(WebKit::WebPageProxy::willSubmitForm):
(WebKit::WebPageProxy::mouseDidMoveOverElement):
(WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress):
(WebKit::WebPageProxy::didRecognizeLongMousePress):
(WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress):
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showSelectionServiceMenu):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement):
(WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress):
(WebKit::WebChromeClient::didRecognizeLongMousePress):
(WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::detachedFromParent2):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
(WebKit::WebFrameLoaderClient::didDetectXSS):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177795 268f45cc-cd09-0410-ab3c-d52691b4dbfc