Source/WebCore: WebKit2: remove NSPasteboard access for promised data from the WebProcess
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Mar 2012 22:45:47 +0000 (22:45 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Mar 2012 22:45:47 +0000 (22:45 +0000)
commit0d2869903e2fc7438617b40b68d7cbd2ebbe9faa
treeb4d61338580b606e96a1938813a6d3354ec0ab0b
parent588b51991fcb22ee758a3314f03818fe4908ef57
Source/WebCore: WebKit2: remove NSPasteboard access for promised data from the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=80073

Reviewed by Alexey Proskuryakov.

* WebCore.exp.in: Added two exported methods.
* platform/mac/FileSystemMac.mm:
(WebCore::setMetaData): Last parameter in the call to wkSetMetadataURL
needs to be wrapped in String before casting to NSString.

Source/WebKit2: WebKit2: remove NSPasteboard access for promised data from the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=80073

Reviewed by Alexey Proskuryakov.

This patch removes the last remaining access to NSPasteboard from the WebProcess.
The code in WebDragClient::declareAndWriteDragImage now packages all the data
required for the drag and the promised drag types and sends one request to the UI
process that will place the data in the NSPasteboard when appropriate.

* UIProcess/API/mac/PageClientImpl.h: Added setPromisedData method.
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setPromisedData):
* UIProcess/API/mac/WKView.mm:
(matchesExtensionOrEquivalent): Added.
(fileExists): Added.
(pathWithUniqueFilenameForPath): Added.
(-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
(-[WKView pasteboardChangedOwner:]):
(-[WKView pasteboard:provideDataForType:]):
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
* UIProcess/API/mac/WKViewInternal.h: Added _setPromisedData.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h: Added method for the new message.
* UIProcess/WebPageProxy.messages.in: Added setPromisedData message.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setPromisedData):
* WebProcess/WebCoreSupport/WebDragClient.cpp:
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Added SetMetadataURL.

WebKitLibraries: WebKit2: remove NSPasteboard access for promised data from the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=80073

* WebKitSystemInterface.h: Touched the file to make build system happy.
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceSnowLeopard.a:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/mac/FileSystemMac.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceLion.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a