<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[243325] trunk/Source/WebKit</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/243325">243325</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2019-03-21 14:03:43 -0700 (Thu, 21 Mar 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Stop using LegacySync messages in WebPasteboardProxy
https://bugs.webkit.org/show_bug.cgi?id=196060

Reviewed by Chris Dumez.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::getPasteboardTypes):
(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
(WebKit::WebPasteboardProxy::getPasteboardStringForType):
(WebKit::WebPasteboardProxy::getPasteboardStringsForType):
(WebKit::WebPasteboardProxy::getPasteboardBufferForType):
(WebKit::WebPasteboardProxy::pasteboardCopy):
(WebKit::WebPasteboardProxy::getPasteboardChangeCount):
(WebKit::WebPasteboardProxy::getPasteboardUniqueName):
(WebKit::WebPasteboardProxy::getPasteboardColor):
(WebKit::WebPasteboardProxy::getPasteboardURL):
(WebKit::WebPasteboardProxy::addPasteboardTypes):
(WebKit::WebPasteboardProxy::setPasteboardTypes):
(WebKit::WebPasteboardProxy::setPasteboardURL):
(WebKit::WebPasteboardProxy::setPasteboardColor):
(WebKit::WebPasteboardProxy::setPasteboardStringForType):
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
(WebKit::WebPasteboardProxy::getNumberOfFiles):
(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
(WebKit::WebPasteboardProxy::writeCustomData):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):
(WebKit::WebPasteboardProxy::getPasteboardItemsCount):
(WebKit::WebPasteboardProxy::allPasteboardItemInfo):
(WebKit::WebPasteboardProxy::informationForItemAtIndex):
* UIProcess/WebPasteboardProxy.cpp:
(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
(WebKit::WebPasteboardProxy::writeCustomData):
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* UIProcess/gtk/WebPasteboardProxyGtk.cpp:
(WebKit::WebPasteboardProxy::writeToClipboard):
(WebKit::WebPasteboardProxy::readFromClipboard):
* UIProcess/wpe/WebPasteboardProxyWPE.cpp:
(WebKit::WebPasteboardProxy::getPasteboardTypes):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::writeWebContentToPasteboard):
(WebKit::WebPasteboardProxy::writeStringToPasteboard):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessCocoaWebPasteboardProxyCocoamm">trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPasteboardProxycpp">trunk/Source/WebKit/UIProcess/WebPasteboardProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPasteboardProxyh">trunk/Source/WebKit/UIProcess/WebPasteboardProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPasteboardProxymessagesin">trunk/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKitUIProcessgtkWebPasteboardProxyGtkcpp">trunk/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcesswpeWebPasteboardProxyWPEcpp">trunk/Source/WebKit/UIProcess/wpe/WebPasteboardProxyWPE.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (243324 => 243325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-03-21 20:51:56 UTC (rev 243324)
+++ trunk/Source/WebKit/ChangeLog       2019-03-21 21:03:43 UTC (rev 243325)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2019-03-21  Alex Christensen  <achristensen@webkit.org>
+
+        Stop using LegacySync messages in WebPasteboardProxy
+        https://bugs.webkit.org/show_bug.cgi?id=196060
+
+        Reviewed by Chris Dumez.
+
+        * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
+        (WebKit::WebPasteboardProxy::getPasteboardTypes):
+        (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
+        (WebKit::WebPasteboardProxy::getPasteboardStringForType):
+        (WebKit::WebPasteboardProxy::getPasteboardStringsForType):
+        (WebKit::WebPasteboardProxy::getPasteboardBufferForType):
+        (WebKit::WebPasteboardProxy::pasteboardCopy):
+        (WebKit::WebPasteboardProxy::getPasteboardChangeCount):
+        (WebKit::WebPasteboardProxy::getPasteboardUniqueName):
+        (WebKit::WebPasteboardProxy::getPasteboardColor):
+        (WebKit::WebPasteboardProxy::getPasteboardURL):
+        (WebKit::WebPasteboardProxy::addPasteboardTypes):
+        (WebKit::WebPasteboardProxy::setPasteboardTypes):
+        (WebKit::WebPasteboardProxy::setPasteboardURL):
+        (WebKit::WebPasteboardProxy::setPasteboardColor):
+        (WebKit::WebPasteboardProxy::setPasteboardStringForType):
+        (WebKit::WebPasteboardProxy::setPasteboardBufferForType):
+        (WebKit::WebPasteboardProxy::getNumberOfFiles):
+        (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
+        (WebKit::WebPasteboardProxy::writeCustomData):
+        (WebKit::WebPasteboardProxy::readStringFromPasteboard):
+        (WebKit::WebPasteboardProxy::readURLFromPasteboard):
+        (WebKit::WebPasteboardProxy::readBufferFromPasteboard):
+        (WebKit::WebPasteboardProxy::getPasteboardItemsCount):
+        (WebKit::WebPasteboardProxy::allPasteboardItemInfo):
+        (WebKit::WebPasteboardProxy::informationForItemAtIndex):
+        * UIProcess/WebPasteboardProxy.cpp:
+        (WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
+        (WebKit::WebPasteboardProxy::writeCustomData):
+        * UIProcess/WebPasteboardProxy.h:
+        * UIProcess/WebPasteboardProxy.messages.in:
+        * UIProcess/gtk/WebPasteboardProxyGtk.cpp:
+        (WebKit::WebPasteboardProxy::writeToClipboard):
+        (WebKit::WebPasteboardProxy::readFromClipboard):
+        * UIProcess/wpe/WebPasteboardProxyWPE.cpp:
+        (WebKit::WebPasteboardProxy::getPasteboardTypes):
+        (WebKit::WebPasteboardProxy::readStringFromPasteboard):
+        (WebKit::WebPasteboardProxy::writeWebContentToPasteboard):
+        (WebKit::WebPasteboardProxy::writeStringToPasteboard):
+
</ins><span class="cx"> 2019-03-21  Andy Estes  <aestes@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [iOS] Apple Pay should be available in documents with no user agent scripts
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessCocoaWebPasteboardProxyCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm (243324 => 243325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm   2019-03-21 20:51:56 UTC (rev 243324)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm      2019-03-21 21:03:43 UTC (rev 243325)
</span><span class="lines">@@ -38,14 +38,18 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardTypes(const String& pasteboardName, Vector<String>& pasteboardTypes)
</del><ins>+void WebPasteboardProxy::getPasteboardTypes(const String& pasteboardName, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
</ins><span class="cx"> {
</span><ins>+    Vector<String> pasteboardTypes;
</ins><span class="cx">     PlatformPasteboard(pasteboardName).getTypes(pasteboardTypes);
</span><ins>+    completionHandler(WTFMove(pasteboardTypes));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPasteboardProxy::getPasteboardPathnamesForType(IPC::Connection& connection, const String& pasteboardName, const String& pasteboardType,
</span><del>-    Vector<String>& pathnames, SandboxExtension::HandleArray& sandboxExtensions)
</del><ins>+    CompletionHandler<void(Vector<String>&& pathnames, SandboxExtension::HandleArray&& sandboxExtensions)>&& completionHandler)
</ins><span class="cx"> {
</span><ins>+    Vector<String> pathnames;
+    SandboxExtension::HandleArray sandboxExtensions;
</ins><span class="cx">     for (auto* webProcessProxy : m_webProcessProxyList) {
</span><span class="cx">         if (!webProcessProxy->hasConnection(connection))
</span><span class="cx">             continue;
</span><span class="lines">@@ -63,119 +67,117 @@
</span><span class="cx">         }
</span><span class="cx"> #endif
</span><span class="cx">     }
</span><ins>+    completionHandler(WTFMove(pathnames), WTFMove(sandboxExtensions));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, String& string)
</del><ins>+void WebPasteboardProxy::getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, CompletionHandler<void(String&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    string = PlatformPasteboard(pasteboardName).stringForType(pasteboardType);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).stringForType(pasteboardType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardStringsForType(const String& pasteboardName, const String& pasteboardType, Vector<String>& strings)
</del><ins>+void WebPasteboardProxy::getPasteboardStringsForType(const String& pasteboardName, const String& pasteboardType, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    strings = PlatformPasteboard(pasteboardName).allStringsForType(pasteboardType);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).allStringsForType(pasteboardType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, SharedMemory::Handle& handle, uint64_t& size)
</del><ins>+void WebPasteboardProxy::getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, CompletionHandler<void(SharedMemory::Handle&&, uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr<SharedBuffer> buffer = PlatformPasteboard(pasteboardName).bufferForType(pasteboardType);
</span><span class="cx">     if (!buffer)
</span><del>-        return;
-    size = buffer->size();
</del><ins>+        return completionHandler({ }, 0);
+    uint64_t size = buffer->size();
</ins><span class="cx">     if (!size)
</span><del>-        return;
</del><ins>+        return completionHandler({ }, 0);
</ins><span class="cx">     RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::allocate(size);
</span><span class="cx">     if (!sharedMemoryBuffer)
</span><del>-        return;
</del><ins>+        return completionHandler({ }, 0);
</ins><span class="cx">     memcpy(sharedMemoryBuffer->data(), buffer->data(), size);
</span><ins>+    SharedMemory::Handle handle;
</ins><span class="cx">     sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly);
</span><ins>+    completionHandler(WTFMove(handle), size);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    newChangeCount = PlatformPasteboard(toPasteboard).copy(fromPasteboard);
</del><ins>+    completionHandler(PlatformPasteboard(toPasteboard).copy(fromPasteboard));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardChangeCount(const String& pasteboardName, uint64_t& changeCount)
</del><ins>+void WebPasteboardProxy::getPasteboardChangeCount(const String& pasteboardName, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    changeCount = PlatformPasteboard(pasteboardName).changeCount();
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).changeCount());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardUniqueName(String& pasteboardName)
</del><ins>+void WebPasteboardProxy::getPasteboardUniqueName(CompletionHandler<void(String&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    pasteboardName = PlatformPasteboard::uniqueName();
</del><ins>+    completionHandler(PlatformPasteboard::uniqueName());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardColor(const String& pasteboardName, WebCore::Color& color)
</del><ins>+void WebPasteboardProxy::getPasteboardColor(const String& pasteboardName, CompletionHandler<void(WebCore::Color&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    color = PlatformPasteboard(pasteboardName).color();    
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).color());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardURL(const String& pasteboardName, WTF::String& urlString)
</del><ins>+void WebPasteboardProxy::getPasteboardURL(const String& pasteboardName, CompletionHandler<void(const String&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    urlString = PlatformPasteboard(pasteboardName).url().string();
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).url().string());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    newChangeCount = PlatformPasteboard(pasteboardName).addTypes(pasteboardTypes);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).addTypes(pasteboardTypes));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    newChangeCount = PlatformPasteboard(pasteboardName).setTypes(pasteboardTypes);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).setTypes(pasteboardTypes));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::setPasteboardURL(IPC::Connection& connection, const PasteboardURL& pasteboardURL, const String& pasteboardName, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::setPasteboardURL(IPC::Connection& connection, const PasteboardURL& pasteboardURL, const String& pasteboardName, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     for (auto* webProcessProxy : m_webProcessProxyList) {
</span><span class="cx">         if (!webProcessProxy->hasConnection(connection))
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        if (!webProcessProxy->checkURLReceivedFromWebProcess(pasteboardURL.url.string())) {
-            newChangeCount = 0;
-            return;
-        }
</del><ins>+        if (!webProcessProxy->checkURLReceivedFromWebProcess(pasteboardURL.url.string()))
+            return completionHandler(0);
</ins><span class="cx"> 
</span><del>-        newChangeCount = PlatformPasteboard(pasteboardName).setURL(pasteboardURL);
-        return;
</del><ins>+        return completionHandler(PlatformPasteboard(pasteboardName).setURL(pasteboardURL));
</ins><span class="cx">     }
</span><del>-    newChangeCount = 0;
</del><ins>+    completionHandler(0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::setPasteboardColor(const String& pasteboardName, const WebCore::Color& color, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::setPasteboardColor(const String& pasteboardName, const WebCore::Color& color, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    newChangeCount = PlatformPasteboard(pasteboardName).setColor(color);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).setColor(color));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String& string, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String& string, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    newChangeCount = PlatformPasteboard(pasteboardName).setStringForType(string, pasteboardType);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).setStringForType(string, pasteboardType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle& handle, uint64_t size, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle& handle, uint64_t size, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    if (handle.isNull()) {
-        newChangeCount = PlatformPasteboard(pasteboardName).setBufferForType(0, pasteboardType);
-        return;
-    }
</del><ins>+    if (handle.isNull())
+        return completionHandler(PlatformPasteboard(pasteboardName).setBufferForType(0, pasteboardType));
</ins><span class="cx">     RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::map(handle, SharedMemory::Protection::ReadOnly);
</span><span class="cx">     auto buffer = SharedBuffer::create(static_cast<unsigned char *>(sharedMemoryBuffer->data()), size);
</span><del>-    newChangeCount = PlatformPasteboard(pasteboardName).setBufferForType(buffer.ptr(), pasteboardType);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).setBufferForType(buffer.ptr(), pasteboardType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getNumberOfFiles(const String& pasteboardName, uint64_t& numberOfFiles)
</del><ins>+void WebPasteboardProxy::getNumberOfFiles(const String& pasteboardName, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    numberOfFiles = PlatformPasteboard(pasteboardName).numberOfFiles();
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).numberOfFiles());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::typesSafeForDOMToReadAndWrite(const String& pasteboardName, const String& origin, Vector<String>& types)
</del><ins>+void WebPasteboardProxy::typesSafeForDOMToReadAndWrite(const String& pasteboardName, const String& origin, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    types = PlatformPasteboard(pasteboardName).typesSafeForDOMToReadAndWrite(origin);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).typesSafeForDOMToReadAndWrite(origin));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::writeCustomData(const WebCore::PasteboardCustomData& data, const String& pasteboardName, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::writeCustomData(const WebCore::PasteboardCustomData& data, const String& pasteboardName, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    newChangeCount = PlatformPasteboard(pasteboardName).write(data);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).write(data));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="lines">@@ -200,44 +202,48 @@
</span><span class="cx">     PlatformPasteboard(pasteboardName).write(pasteboardType, text);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::readStringFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, WTF::String& value)
</del><ins>+void WebPasteboardProxy::readStringFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, CompletionHandler<void(String&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    value = PlatformPasteboard(pasteboardName).readString(index, pasteboardType);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).readString(index, pasteboardType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::readURLFromPasteboard(uint64_t index, const String& pasteboardName, String& url, String& title)
</del><ins>+void WebPasteboardProxy::readURLFromPasteboard(uint64_t index, const String& pasteboardName, CompletionHandler<void(String&& url, String&& title)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    url = PlatformPasteboard(pasteboardName).readURL(index, title);
</del><ins>+    String title;
+    String url = PlatformPasteboard(pasteboardName).readURL(index, title);
+    completionHandler(WTFMove(url), WTFMove(title));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, SharedMemory::Handle& handle, uint64_t& size)
</del><ins>+void WebPasteboardProxy::readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, CompletionHandler<void(SharedMemory::Handle&&, uint64_t size)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr<SharedBuffer> buffer = PlatformPasteboard(pasteboardName).readBuffer(index, pasteboardType);
</span><span class="cx">     if (!buffer)
</span><del>-        return;
-    size = buffer->size();
</del><ins>+        return completionHandler({ }, 0);
+    uint64_t size = buffer->size();
</ins><span class="cx">     if (!size)
</span><del>-        return;
</del><ins>+        return completionHandler({ }, 0);
</ins><span class="cx">     RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::allocate(size);
</span><span class="cx">     if (!sharedMemoryBuffer)
</span><del>-        return;
</del><ins>+        return completionHandler({ }, 0);
</ins><span class="cx">     memcpy(sharedMemoryBuffer->data(), buffer->data(), size);
</span><ins>+    SharedMemory::Handle handle;
</ins><span class="cx">     sharedMemoryBuffer->createHandle(handle, SharedMemory::Protection::ReadOnly);
</span><ins>+    completionHandler(WTFMove(handle), size);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardItemsCount(const String& pasteboardName, uint64_t& itemsCount)
</del><ins>+void WebPasteboardProxy::getPasteboardItemsCount(const String& pasteboardName, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    itemsCount = PlatformPasteboard(pasteboardName).count();
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).count());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::allPasteboardItemInfo(const String& pasteboardName, Vector<PasteboardItemInfo>& allInfo)
</del><ins>+void WebPasteboardProxy::allPasteboardItemInfo(const String& pasteboardName, CompletionHandler<void(Vector<PasteboardItemInfo>&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    allInfo = PlatformPasteboard(pasteboardName).allPasteboardItemInfo();
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).allPasteboardItemInfo());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::informationForItemAtIndex(int index, const String& pasteboardName, PasteboardItemInfo& info)
</del><ins>+void WebPasteboardProxy::informationForItemAtIndex(int index, const String& pasteboardName, CompletionHandler<void(PasteboardItemInfo&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    info = PlatformPasteboard(pasteboardName).informationForItemAtIndex(index);
</del><ins>+    completionHandler(PlatformPasteboard(pasteboardName).informationForItemAtIndex(index));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPasteboardProxy::updateSupportedTypeIdentifiers(const Vector<String>& identifiers, const String& pasteboardName)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPasteboardProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPasteboardProxy.cpp (243324 => 243325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPasteboardProxy.cpp     2019-03-21 20:51:56 UTC (rev 243324)
+++ trunk/Source/WebKit/UIProcess/WebPasteboardProxy.cpp        2019-03-21 21:03:43 UTC (rev 243325)
</span><span class="lines">@@ -63,14 +63,14 @@
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::typesSafeForDOMToReadAndWrite(const String&, const String&, Vector<String>& types)
</del><ins>+void WebPasteboardProxy::typesSafeForDOMToReadAndWrite(const String&, const String&, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    types = { };
</del><ins>+    completionHandler({ });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::writeCustomData(const WebCore::PasteboardCustomData&, const String&, uint64_t& newChangeCount)
</del><ins>+void WebPasteboardProxy::writeCustomData(const WebCore::PasteboardCustomData&, const String&, CompletionHandler<void(uint64_t)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    newChangeCount = 0;
</del><ins>+    completionHandler(0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPasteboardProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPasteboardProxy.h (243324 => 243325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPasteboardProxy.h       2019-03-21 20:51:56 UTC (rev 243324)
+++ trunk/Source/WebKit/UIProcess/WebPasteboardProxy.h  2019-03-21 21:03:43 UTC (rev 243325)
</span><span class="lines">@@ -73,40 +73,40 @@
</span><span class="cx">     void writeWebContentToPasteboard(const WebCore::PasteboardWebContent&, const String& pasteboardName);
</span><span class="cx">     void writeImageToPasteboard(const WebCore::PasteboardImage&, const String& pasteboardName);
</span><span class="cx">     void writeStringToPasteboard(const String& pasteboardType, const String&, const String& pasteboardName);
</span><del>-    void readStringFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, WTF::String&);
-    void readURLFromPasteboard(uint64_t index, const String& pasteboardName, String& url, String& title);
-    void readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, SharedMemory::Handle&, uint64_t& size);
-    void getPasteboardItemsCount(const String& pasteboardName, uint64_t& itemsCount);
-    void allPasteboardItemInfo(const String& pasteboardName, Vector<WebCore::PasteboardItemInfo>&);
-    void informationForItemAtIndex(int index, const String& pasteboardName, WebCore::PasteboardItemInfo& filename);
</del><ins>+    void readStringFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, CompletionHandler<void(String&&)>&&);
+    void readURLFromPasteboard(uint64_t index, const String& pasteboardName, CompletionHandler<void(String&& url, String&& title)>&&);
+    void readBufferFromPasteboard(uint64_t index, const String& pasteboardType, const String& pasteboardName, CompletionHandler<void(SharedMemory::Handle&&, uint64_t size)>&&);
+    void getPasteboardItemsCount(const String& pasteboardName, CompletionHandler<void(uint64_t)>&&);
+    void allPasteboardItemInfo(const String& pasteboardName, CompletionHandler<void(Vector<WebCore::PasteboardItemInfo>&&)>&&);
+    void informationForItemAtIndex(int index, const String& pasteboardName, CompletionHandler<void(WebCore::PasteboardItemInfo&&)>&&);
</ins><span class="cx">     void updateSupportedTypeIdentifiers(const Vector<String>& identifiers, const String& pasteboardName);
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    void getNumberOfFiles(const String& pasteboardName, uint64_t& numberOfFiles);
-    void getPasteboardTypes(const String& pasteboardName, Vector<String>& pasteboardTypes);
-    void getPasteboardPathnamesForType(IPC::Connection&, const String& pasteboardName, const String& pasteboardType, Vector<String>& pathnames, SandboxExtension::HandleArray&);
-    void getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, String&);
-    void getPasteboardStringsForType(const String& pasteboardName, const String& pasteboardType, Vector<String>&);
-    void getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, SharedMemory::Handle&, uint64_t& size);
-    void pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, uint64_t& newChangeCount);
-    void getPasteboardChangeCount(const String& pasteboardName, uint64_t& changeCount);
-    void getPasteboardUniqueName(String& pasteboardName);
-    void getPasteboardColor(const String& pasteboardName, WebCore::Color&);
-    void getPasteboardURL(const String& pasteboardName, WTF::String&);
-    void addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount);
-    void setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount);
-    void setPasteboardURL(IPC::Connection&, const WebCore::PasteboardURL&, const String& pasteboardName, uint64_t& newChangeCount);
-    void setPasteboardColor(const String&, const WebCore::Color&, uint64_t&);
-    void setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String&, uint64_t& newChangeCount);
-    void setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle&, uint64_t size, uint64_t& newChangeCount);
</del><ins>+    void getNumberOfFiles(const String& pasteboardName, CompletionHandler<void(uint64_t)>&&);
+    void getPasteboardTypes(const String& pasteboardName, CompletionHandler<void(Vector<String>&&)>&&);
+    void getPasteboardPathnamesForType(IPC::Connection&, const String& pasteboardName, const String& pasteboardType, CompletionHandler<void(Vector<String>&& pathnames, SandboxExtension::HandleArray&&)>&&);
+    void getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, CompletionHandler<void(String&&)>&&);
+    void getPasteboardStringsForType(const String& pasteboardName, const String& pasteboardType, CompletionHandler<void(Vector<String>&&)>&&);
+    void getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, CompletionHandler<void(SharedMemory::Handle&&, uint64_t)>&&);
+    void pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, CompletionHandler<void(uint64_t)>&&);
+    void getPasteboardChangeCount(const String& pasteboardName, CompletionHandler<void(uint64_t)>&&);
+    void getPasteboardUniqueName(CompletionHandler<void(String&&)>&&);
+    void getPasteboardColor(const String& pasteboardName, CompletionHandler<void(WebCore::Color&&)>&&);
+    void getPasteboardURL(const String& pasteboardName, CompletionHandler<void(const String&)>&&);
+    void addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, CompletionHandler<void(uint64_t)>&&);
+    void setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, CompletionHandler<void(uint64_t)>&&);
+    void setPasteboardURL(IPC::Connection&, const WebCore::PasteboardURL&, const String& pasteboardName, CompletionHandler<void(uint64_t)>&&);
+    void setPasteboardColor(const String&, const WebCore::Color&, CompletionHandler<void(uint64_t)>&&);
+    void setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String&, CompletionHandler<void(uint64_t)>&&);
+    void setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle&, uint64_t size, CompletionHandler<void(uint64_t)>&&);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void writeCustomData(const WebCore::PasteboardCustomData&, const String& pasteboardName, uint64_t& newChangeCount);
-    void typesSafeForDOMToReadAndWrite(const String& pasteboardName, const String& origin, Vector<String>& types);
</del><ins>+    void writeCustomData(const WebCore::PasteboardCustomData&, const String& pasteboardName, CompletionHandler<void(uint64_t)>&&);
+    void typesSafeForDOMToReadAndWrite(const String& pasteboardName, const String& origin, CompletionHandler<void(Vector<String>&&)>&&);
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     void writeToClipboard(const String& pasteboardName, const WebSelectionData&);
</span><del>-    void readFromClipboard(const String& pasteboardName, WebSelectionData&);
</del><ins>+    void readFromClipboard(const String& pasteboardName, CompletionHandler<void(WebSelectionData&&)>&&);
</ins><span class="cx"> 
</span><span class="cx">     WebFrameProxy* m_primarySelectionOwner { nullptr };
</span><span class="cx">     WebFrameProxy* m_frameWritingToClipboard { nullptr };
</span><span class="lines">@@ -113,8 +113,8 @@
</span><span class="cx"> #endif // PLATFORM(GTK)
</span><span class="cx"> 
</span><span class="cx"> #if USE(LIBWPE)
</span><del>-    void getPasteboardTypes(Vector<String>& pasteboardTypes);
-    void readStringFromPasteboard(uint64_t index, const String& pasteboardType, WTF::String&);
</del><ins>+    void getPasteboardTypes(CompletionHandler<void(Vector<String>&&)>&&);
+    void readStringFromPasteboard(uint64_t index, const String& pasteboardType, CompletionHandler<void(String&&)>&&);
</ins><span class="cx">     void writeWebContentToPasteboard(const WebCore::PasteboardWebContent&);
</span><span class="cx">     void writeStringToPasteboard(const String& pasteboardType, const String&);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPasteboardProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in (243324 => 243325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in     2019-03-21 20:51:56 UTC (rev 243324)
+++ trunk/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in        2019-03-21 21:03:43 UTC (rev 243325)
</span><span class="lines">@@ -26,48 +26,48 @@
</span><span class="cx">     WriteWebContentToPasteboard(struct WebCore::PasteboardWebContent content, String pasteboardName)
</span><span class="cx">     WriteImageToPasteboard(struct WebCore::PasteboardImage pasteboardImage, String pasteboardName)
</span><span class="cx">     WriteStringToPasteboard(String pasteboardType, String text, String pasteboardName)
</span><del>-    ReadStringFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (String string) LegacySync
-    ReadURLFromPasteboard(uint64_t index, String pasteboardName) -> (String url, String title) LegacySync
-    ReadBufferFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (WebKit::SharedMemory::Handle handle, uint64_t size) LegacySync
-    GetPasteboardItemsCount(String pasteboardName) -> (uint64_t itemsCount) LegacySync
-    AllPasteboardItemInfo(String pasteboardName) -> (Vector<WebCore::PasteboardItemInfo> allInfo) LegacySync
-    InformationForItemAtIndex(uint64_t index, String pasteboardName) -> (struct WebCore::PasteboardItemInfo info) LegacySync
</del><ins>+    ReadStringFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (String string) Delayed
+    ReadURLFromPasteboard(uint64_t index, String pasteboardName) -> (String url, String title) Delayed
+    ReadBufferFromPasteboard(uint64_t index, String pasteboardType, String pasteboardName) -> (WebKit::SharedMemory::Handle handle, uint64_t size) Delayed
+    GetPasteboardItemsCount(String pasteboardName) -> (uint64_t itemsCount) Delayed
+    AllPasteboardItemInfo(String pasteboardName) -> (Vector<WebCore::PasteboardItemInfo> allInfo) Delayed
+    InformationForItemAtIndex(uint64_t index, String pasteboardName) -> (struct WebCore::PasteboardItemInfo info) Delayed
</ins><span class="cx">     UpdateSupportedTypeIdentifiers(Vector<String> identifiers, String pasteboardName)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    WriteCustomData(struct WebCore::PasteboardCustomData data, String pasteboardName) -> (uint64_t changeCount) LegacySync
-    TypesSafeForDOMToReadAndWrite(String pasteboardName, String origin) -> (Vector<String> types) LegacySync
</del><ins>+    WriteCustomData(struct WebCore::PasteboardCustomData data, String pasteboardName) -> (uint64_t changeCount) Delayed
+    TypesSafeForDOMToReadAndWrite(String pasteboardName, String origin) -> (Vector<String> types) Delayed
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     # Pasteboard messages.
</span><del>-    GetNumberOfFiles(String pasteboardName) -> (uint64_t numberOfFiles) LegacySync
-    GetPasteboardTypes(String pasteboardName) -> (Vector<String> types) LegacySync
-    GetPasteboardPathnamesForType(String pasteboardName, String pasteboardType) -> (Vector<String> pathnames, WebKit::SandboxExtension::HandleArray sandboxExtensions) LegacySync WantsConnection
-    GetPasteboardStringForType(String pasteboardName, String pasteboardType) -> (String string) LegacySync
-    GetPasteboardStringsForType(String pasteboardName, String pasteboardType) -> (Vector<String> strings) LegacySync
-    GetPasteboardBufferForType(String pasteboardName, String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size) LegacySync
-    PasteboardCopy(String fromPasteboard, String toPasteboard) -> (uint64_t changeCount) LegacySync
-    GetPasteboardChangeCount(String pasteboardName) -> (uint64_t changeCount) LegacySync
-    GetPasteboardUniqueName() -> (String pasteboardName) LegacySync
-    GetPasteboardColor(String pasteboardName) -> (WebCore::Color color) LegacySync
-    GetPasteboardURL(String pasteboardName) -> (String urlString) LegacySync
-    AddPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount) LegacySync
-    SetPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount) LegacySync
-    SetPasteboardURL(struct WebCore::PasteboardURL pasteboardURL, String pasteboardName) -> (uint64_t changeCount) LegacySync WantsConnection
-    SetPasteboardColor(String pasteboardName, WebCore::Color color) -> (uint64_t changeCount) LegacySync
-    SetPasteboardStringForType(String pasteboardName, String pasteboardType, String string) -> (uint64_t changeCount) LegacySync
-    SetPasteboardBufferForType(String pasteboardName, String pasteboardType, WebKit::SharedMemory::Handle handle, uint64_t size) -> (uint64_t changeCount) LegacySync
</del><ins>+    GetNumberOfFiles(String pasteboardName) -> (uint64_t numberOfFiles) Delayed
+    GetPasteboardTypes(String pasteboardName) -> (Vector<String> types) Delayed
+    GetPasteboardPathnamesForType(String pasteboardName, String pasteboardType) -> (Vector<String> pathnames, WebKit::SandboxExtension::HandleArray sandboxExtensions) Delayed WantsConnection
+    GetPasteboardStringForType(String pasteboardName, String pasteboardType) -> (String string) Delayed
+    GetPasteboardStringsForType(String pasteboardName, String pasteboardType) -> (Vector<String> strings) Delayed
+    GetPasteboardBufferForType(String pasteboardName, String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size) Delayed
+    PasteboardCopy(String fromPasteboard, String toPasteboard) -> (uint64_t changeCount) Delayed
+    GetPasteboardChangeCount(String pasteboardName) -> (uint64_t changeCount) Delayed
+    GetPasteboardUniqueName() -> (String pasteboardName) Delayed
+    GetPasteboardColor(String pasteboardName) -> (WebCore::Color color) Delayed
+    GetPasteboardURL(String pasteboardName) -> (String urlString) Delayed
+    AddPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount) Delayed
+    SetPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount) Delayed
+    SetPasteboardURL(struct WebCore::PasteboardURL pasteboardURL, String pasteboardName) -> (uint64_t changeCount) Delayed WantsConnection
+    SetPasteboardColor(String pasteboardName, WebCore::Color color) -> (uint64_t changeCount) Delayed
+    SetPasteboardStringForType(String pasteboardName, String pasteboardType, String string) -> (uint64_t changeCount) Delayed
+    SetPasteboardBufferForType(String pasteboardName, String pasteboardType, WebKit::SharedMemory::Handle handle, uint64_t size) -> (uint64_t changeCount) Delayed
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><del>-    WriteToClipboard(String pasteboardName, struct WebKit::WebSelectionData pasteboardContent) LegacySync
-    ReadFromClipboard(String pasteboardName) -> (struct WebKit::WebSelectionData pasteboardContent) LegacySync
</del><ins>+    WriteToClipboard(String pasteboardName, struct WebKit::WebSelectionData pasteboardContent)
+    ReadFromClipboard(String pasteboardName) -> (struct WebKit::WebSelectionData pasteboardContent) Delayed
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(LIBWPE)
</span><del>-    GetPasteboardTypes() -> (Vector<String> types) LegacySync
-    ReadStringFromPasteboard(uint64_t index, String pasteboardType) -> (String string) LegacySync
-    WriteWebContentToPasteboard(struct WebCore::PasteboardWebContent content) LegacySync
-    WriteStringToPasteboard(String pasteboardType, String text) LegacySync
</del><ins>+    GetPasteboardTypes() -> (Vector<String> types) Delayed
+    ReadStringFromPasteboard(uint64_t index, String pasteboardType) -> (String string) Delayed
+    WriteWebContentToPasteboard(struct WebCore::PasteboardWebContent content)
+    WriteStringToPasteboard(String pasteboardType, String text)
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessgtkWebPasteboardProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp (243324 => 243325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp      2019-03-21 20:51:56 UTC (rev 243324)
+++ trunk/Source/WebKit/UIProcess/gtk/WebPasteboardProxyGtk.cpp 2019-03-21 21:03:43 UTC (rev 243325)
</span><span class="lines">@@ -44,9 +44,9 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::readFromClipboard(const String& pasteboardName, WebSelectionData& selection)
</del><ins>+void WebPasteboardProxy::readFromClipboard(const String& pasteboardName, CompletionHandler<void(WebSelectionData&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    selection = WebSelectionData(PlatformPasteboard(pasteboardName).readFromClipboard());
</del><ins>+    completionHandler(WebSelectionData(PlatformPasteboard(pasteboardName).readFromClipboard()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPasteboardProxy::setPrimarySelectionOwner(WebFrameProxy* frame)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcesswpeWebPasteboardProxyWPEcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/wpe/WebPasteboardProxyWPE.cpp (243324 => 243325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/wpe/WebPasteboardProxyWPE.cpp      2019-03-21 20:51:56 UTC (rev 243324)
+++ trunk/Source/WebKit/UIProcess/wpe/WebPasteboardProxyWPE.cpp 2019-03-21 21:03:43 UTC (rev 243325)
</span><span class="lines">@@ -32,14 +32,16 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::getPasteboardTypes(Vector<String>& pasteboardTypes)
</del><ins>+void WebPasteboardProxy::getPasteboardTypes(CompletionHandler<void(Vector<String>&&)>&& completionHandler)
</ins><span class="cx"> {
</span><ins>+    Vector<String> pasteboardTypes;
</ins><span class="cx">     PlatformPasteboard().getTypes(pasteboardTypes);
</span><ins>+    completionHandler(WTFMove(pasteboardTypes));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPasteboardProxy::readStringFromPasteboard(uint64_t index, const String& pasteboardType, WTF::String& value)
</del><ins>+void WebPasteboardProxy::readStringFromPasteboard(uint64_t index, const String& pasteboardType, CompletionHandler<void(String&&)>&& completionHandler)
</ins><span class="cx"> {
</span><del>-    value = PlatformPasteboard().readString(index, pasteboardType);
</del><ins>+    completionHandler(PlatformPasteboard().readString(index, pasteboardType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPasteboardProxy::writeWebContentToPasteboard(const WebCore::PasteboardWebContent& content)
</span></span></pre>
</div>
</div>

</body>
</html>