Changeset 243327 in webkit


Ignore:
Timestamp:
Mar 21, 2019, 2:06:35 PM (6 years ago)
Author:
achristensen@apple.com
Message:

Stop using LegacySync messages in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=196056

Reviewed by Chris Dumez.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::loadRecentSearches):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::backForwardGoToItem):
(WebKit::ProvisionalPageProxy::didReceiveSyncMessage):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleSynchronousMessage):
(WebKit::WebPageProxy::hasInsecureContent):
(WebKit::WebPageProxy::accessibilityScreenToRootView):
(WebKit::WebPageProxy::rootViewToAccessibilityScreen):
(WebKit::WebPageProxy::printFrame):
(WebKit::WebPageProxy::backForwardGoToItem):
(WebKit::WebPageProxy::backForwardGoToItemShared):
(WebKit::WebPageProxy::backForwardItemAtIndex):
(WebKit::WebPageProxy::backForwardBackListCount):
(WebKit::WebPageProxy::backForwardForwardListCount):
(WebKit::WebPageProxy::canUndoRedo):
(WebKit::WebPageProxy::executeUndoRedo):
(WebKit::WebPageProxy::checkTextOfParagraph):
(WebKit::WebPageProxy::checkSpellingOfString):
(WebKit::WebPageProxy::checkGrammarOfString):
(WebKit::WebPageProxy::spellingUIIsShowing):
(WebKit::WebPageProxy::getGuessesForWord):
(WebKit::WebPageProxy::substitutionsPanelIsShowing):
(WebKit::WebPageProxy::showCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanel):
(WebKit::WebPageProxy::dismissCorrectionPanelSoon):
(WebKit::WebPageProxy::recordAutocorrectionResponse):
(WebKit::WebPageProxy::dictationAlternatives):
(WebKit::WebPageProxy::wrapCryptoKey):
(WebKit::WebPageProxy::unwrapCryptoKey):
(WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
(WebKit::WebPageProxy::serializedAttachmentDataForIdentifiers):
(WebKit::WebPageProxy::speechSynthesisVoiceList):
(WebKit::WebPageProxy::printMainFrame): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::createPluginContainer):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::interpretKeyEvent):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::getIsSpeaking):
(WebKit::WebPageProxy::executeSavedCommandBySelector):
(WebKit::WebPageProxy::showPDFContextMenu):

Location:
trunk/Source/WebKit
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r243326 r243327  
     12019-03-21  Alex Christensen  <achristensen@webkit.org>
     2
     3        Stop using LegacySync messages in WebPageProxy
     4        https://bugs.webkit.org/show_bug.cgi?id=196056
     5
     6        Reviewed by Chris Dumez.
     7
     8        * UIProcess/Cocoa/WebPageProxyCocoa.mm:
     9        (WebKit::WebPageProxy::loadRecentSearches):
     10        * UIProcess/ProvisionalPageProxy.cpp:
     11        (WebKit::ProvisionalPageProxy::backForwardGoToItem):
     12        (WebKit::ProvisionalPageProxy::didReceiveSyncMessage):
     13        * UIProcess/ProvisionalPageProxy.h:
     14        * UIProcess/WebPageProxy.cpp:
     15        (WebKit::WebPageProxy::handleSynchronousMessage):
     16        (WebKit::WebPageProxy::hasInsecureContent):
     17        (WebKit::WebPageProxy::accessibilityScreenToRootView):
     18        (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
     19        (WebKit::WebPageProxy::printFrame):
     20        (WebKit::WebPageProxy::backForwardGoToItem):
     21        (WebKit::WebPageProxy::backForwardGoToItemShared):
     22        (WebKit::WebPageProxy::backForwardItemAtIndex):
     23        (WebKit::WebPageProxy::backForwardBackListCount):
     24        (WebKit::WebPageProxy::backForwardForwardListCount):
     25        (WebKit::WebPageProxy::canUndoRedo):
     26        (WebKit::WebPageProxy::executeUndoRedo):
     27        (WebKit::WebPageProxy::checkTextOfParagraph):
     28        (WebKit::WebPageProxy::checkSpellingOfString):
     29        (WebKit::WebPageProxy::checkGrammarOfString):
     30        (WebKit::WebPageProxy::spellingUIIsShowing):
     31        (WebKit::WebPageProxy::getGuessesForWord):
     32        (WebKit::WebPageProxy::substitutionsPanelIsShowing):
     33        (WebKit::WebPageProxy::showCorrectionPanel):
     34        (WebKit::WebPageProxy::dismissCorrectionPanel):
     35        (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
     36        (WebKit::WebPageProxy::recordAutocorrectionResponse):
     37        (WebKit::WebPageProxy::dictationAlternatives):
     38        (WebKit::WebPageProxy::wrapCryptoKey):
     39        (WebKit::WebPageProxy::unwrapCryptoKey):
     40        (WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
     41        (WebKit::WebPageProxy::serializedAttachmentDataForIdentifiers):
     42        (WebKit::WebPageProxy::speechSynthesisVoiceList):
     43        (WebKit::WebPageProxy::printMainFrame): Deleted.
     44        * UIProcess/WebPageProxy.h:
     45        * UIProcess/WebPageProxy.messages.in:
     46        * UIProcess/gtk/WebPageProxyGtk.cpp:
     47        (WebKit::WebPageProxy::createPluginContainer):
     48        * UIProcess/ios/WebPageProxyIOS.mm:
     49        (WebKit::WebPageProxy::interpretKeyEvent):
     50        * UIProcess/mac/WebPageProxyMac.mm:
     51        (WebKit::WebPageProxy::getIsSpeaking):
     52        (WebKit::WebPageProxy::executeSavedCommandBySelector):
     53        (WebKit::WebPageProxy::showPDFContextMenu):
     54
    1552019-03-21  Alex Christensen  <achristensen@webkit.org>
    256
  • trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm

    r243094 r243327  
    6464}
    6565
    66 void WebPageProxy::loadRecentSearches(const String& name, Vector<WebCore::RecentSearch>& searchItems)
     66void WebPageProxy::loadRecentSearches(const String& name, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler)
    6767{
    6868    if (!name) {
    6969        // FIXME: This should be a message check.
    70         return;
    71     }
    72 
    73     searchItems = WebCore::loadRecentSearches(name);
     70        return completionHandler({ });
     71    }
     72
     73    completionHandler(WebCore::loadRecentSearches(name));
    7474}
    7575
  • trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp

    r243159 r243327  
    304304}
    305305
    306 void ProvisionalPageProxy::backForwardGoToItem(const WebCore::BackForwardItemIdentifier& identifier, SandboxExtension::Handle& handle)
    307 {
    308     m_page.backForwardGoToItemShared(m_process.copyRef(), identifier, handle);
     306void ProvisionalPageProxy::backForwardGoToItem(const WebCore::BackForwardItemIdentifier& identifier, CompletionHandler<void(SandboxExtension::Handle&&)>&& completionHandler)
     307{
     308    m_page.backForwardGoToItemShared(m_process.copyRef(), identifier, WTFMove(completionHandler));
    309309}
    310310
     
    446446{
    447447    if (decoder.messageName() == Messages::WebPageProxy::BackForwardGoToItem::name()) {
    448         IPC::handleMessageLegacySync<Messages::WebPageProxy::BackForwardGoToItem>(decoder, *replyEncoder, this, &ProvisionalPageProxy::backForwardGoToItem);
     448        IPC::handleMessageDelayed<Messages::WebPageProxy::BackForwardGoToItem>(connection, decoder, replyEncoder, this, &ProvisionalPageProxy::backForwardGoToItem);
    449449        return;
    450450    }
  • trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.h

    r243159 r243327  
    103103    void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&);
    104104    void startURLSchemeTask(URLSchemeTaskParameters&&);
    105     void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, SandboxExtension::Handle&);
     105    void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&);
    106106    void decidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&,
    107107        FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody,
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r243319 r243327  
    705705}
    706706
    707 void WebPageProxy::handleSynchronousMessage(IPC::Connection& connection, const String& messageName, const UserData& messageBody, UserData& returnUserData)
     707void WebPageProxy::handleSynchronousMessage(IPC::Connection& connection, const String& messageName, const UserData& messageBody, CompletionHandler<void(UserData&&)>&& completionHandler)
    708708{
    709709    ASSERT(m_process->connection() == &connection);
    710710
    711711    if (!m_injectedBundleClient)
    712         return;
     712        return completionHandler({ });
    713713
    714714    RefPtr<API::Object> returnData;
    715715    m_injectedBundleClient->didReceiveSynchronousMessageFromInjectedBundle(this, messageName, m_process->transformHandlesToObjects(messageBody.object()).get(), returnData);
    716     returnUserData = UserData(m_process->transformObjectsToHandles(returnData.get()));
     716    completionHandler(UserData(m_process->transformObjectsToHandles(returnData.get())));
    717717}
    718718
     
    38623862}
    38633863
    3864 void WebPageProxy::hasInsecureContent(HasInsecureContent& hasInsecureContent)
    3865 {
    3866     hasInsecureContent = m_pageLoadState.committedHasInsecureContent() ? HasInsecureContent::Yes : HasInsecureContent::No;
     3864void WebPageProxy::hasInsecureContent(CompletionHandler<void(WebCore::HasInsecureContent)>&& completionHandler)
     3865{
     3866    completionHandler(m_pageLoadState.committedHasInsecureContent() ? HasInsecureContent::Yes : HasInsecureContent::No);
    38673867}
    38683868
     
    52195219}
    52205220
    5221 void WebPageProxy::accessibilityScreenToRootView(const IntPoint& screenPoint, IntPoint& windowPoint)
    5222 {
    5223     windowPoint = pageClient().accessibilityScreenToRootView(screenPoint);
    5224 }
    5225 
    5226 void WebPageProxy::rootViewToAccessibilityScreen(const IntRect& viewRect, IntRect& result)
    5227 {
    5228     result = pageClient().rootViewToAccessibilityScreen(viewRect);
     5221void WebPageProxy::accessibilityScreenToRootView(const IntPoint& screenPoint, CompletionHandler<void(IntPoint)>&& completionHandler)
     5222{
     5223    completionHandler(pageClient().accessibilityScreenToRootView(screenPoint));
     5224}
     5225
     5226void WebPageProxy::rootViewToAccessibilityScreen(const IntRect& viewRect, CompletionHandler<void(IntRect)>&& completionHandler)
     5227{
     5228    completionHandler(pageClient().rootViewToAccessibilityScreen(viewRect));
    52295229}
    52305230
     
    53085308}
    53095309   
    5310 void WebPageProxy::printFrame(uint64_t frameID)
     5310void WebPageProxy::printFrame(uint64_t frameID, CompletionHandler<void()>&& completionHandler)
    53115311{
    53125312    ASSERT(!m_isPerformingDOMPrintOperation);
     
    53205320    endPrinting(); // Send a message synchronously while m_isPerformingDOMPrintOperation is still true.
    53215321    m_isPerformingDOMPrintOperation = false;
    5322 }
    5323 
    5324 void WebPageProxy::printMainFrame()
    5325 {
    5326     printFrame(m_mainFrame->frameID());
     5322
     5323    completionHandler();
    53275324}
    53285325
     
    56075604}
    56085605
    5609 void WebPageProxy::backForwardGoToItem(const BackForwardItemIdentifier& itemID, SandboxExtension::Handle& sandboxExtensionHandle)
     5606void WebPageProxy::backForwardGoToItem(const BackForwardItemIdentifier& itemID, CompletionHandler<void(SandboxExtension::Handle&&)>&& completionHandler)
    56105607{
    56115608    // On process swap, we tell the previous process to ignore the load, which causes it so restore its current back forward item to its previous
     
    56135610    // Any real new load in the committed process would have cleared m_provisionalPage.
    56145611    if (m_provisionalPage)
    5615         return;
    5616 
    5617     backForwardGoToItemShared(m_process.copyRef(), itemID, sandboxExtensionHandle);
    5618 }
    5619 
    5620 void WebPageProxy::backForwardGoToItemShared(Ref<WebProcessProxy>&& process, const BackForwardItemIdentifier& itemID, SandboxExtension::Handle& sandboxExtensionHandle)
    5621 {
    5622     WebBackForwardListItem* item = m_backForwardList->itemForID(itemID);
     5612        return completionHandler({ });
     5613
     5614    SandboxExtension::Handle sandboxExtensionHandle;
     5615    backForwardGoToItemShared(m_process.copyRef(), itemID, WTFMove(completionHandler));
     5616}
     5617
     5618void WebPageProxy::backForwardGoToItemShared(Ref<WebProcessProxy>&& process, const BackForwardItemIdentifier& itemID, CompletionHandler<void(SandboxExtension::Handle&&)>&& completionHandler)
     5619{
     5620    auto* item = m_backForwardList->itemForID(itemID);
    56235621    if (!item)
    5624         return;
    5625 
     5622        return completionHandler({ });
     5623
     5624    SandboxExtension::Handle sandboxExtensionHandle;
    56265625    bool createdExtension = maybeInitializeSandboxExtensionHandle(process, URL(URL(), item->url()), sandboxExtensionHandle);
    56275626    if (createdExtension)
    56285627        willAcquireUniversalFileReadSandboxExtension(process);
    56295628    m_backForwardList->goToItem(*item);
    5630 }
    5631 
    5632 void WebPageProxy::backForwardItemAtIndex(int32_t index, Optional<BackForwardItemIdentifier>& itemID)
    5633 {
    5634     WebBackForwardListItem* item = m_backForwardList->itemAtIndex(index);
    5635     if (item)
    5636         itemID = item->itemID();
     5629    completionHandler(WTFMove(sandboxExtensionHandle));
     5630}
     5631
     5632void WebPageProxy::backForwardItemAtIndex(int32_t index, CompletionHandler<void(Optional<BackForwardItemIdentifier>&&)>&& completionHandler)
     5633{
     5634    if (auto* item = m_backForwardList->itemAtIndex(index))
     5635        completionHandler(item->itemID());
    56375636    else
    5638         itemID = WTF::nullopt;
    5639 }
    5640 
    5641 void WebPageProxy::backForwardBackListCount(uint32_t& count)
    5642 {
    5643     count = m_backForwardList->backListCount();
    5644 }
    5645 
    5646 void WebPageProxy::backForwardForwardListCount(uint32_t& count)
    5647 {
    5648     count = m_backForwardList->forwardListCount();
     5637        completionHandler(WTF::nullopt);
     5638}
     5639
     5640void WebPageProxy::backForwardBackListCount(CompletionHandler<void(uint32_t)>&& completionHandler)
     5641{
     5642    completionHandler(m_backForwardList->backListCount());
     5643}
     5644
     5645void WebPageProxy::backForwardForwardListCount(CompletionHandler<void(uint32_t)>&& completionHandler)
     5646{
     5647    completionHandler(m_backForwardList->forwardListCount());
    56495648}
    56505649
     
    56705669}
    56715670
    5672 void WebPageProxy::canUndoRedo(UndoOrRedo action, bool& result)
    5673 {
    5674     result = pageClient().canUndoRedo(action);
    5675 }
    5676 
    5677 void WebPageProxy::executeUndoRedo(UndoOrRedo action)
     5671void WebPageProxy::canUndoRedo(UndoOrRedo action, CompletionHandler<void(bool)>&& completionHandler)
     5672{
     5673    completionHandler(pageClient().canUndoRedo(action));
     5674}
     5675
     5676void WebPageProxy::executeUndoRedo(UndoOrRedo action, CompletionHandler<void()>&& completionHandler)
    56785677{
    56795678    pageClient().executeUndoRedo(action);
     5679    completionHandler();
    56805680}
    56815681
     
    60706070
    60716071#if USE(UNIFIED_TEXT_CHECKING)
    6072 void WebPageProxy::checkTextOfParagraph(const String& text, OptionSet<TextCheckingType> checkingTypes, int32_t insertionPoint, Vector<TextCheckingResult>& results)
    6073 {
    6074     results = TextChecker::checkTextOfParagraph(spellDocumentTag(), text, insertionPoint, checkingTypes, m_initialCapitalizationEnabled);
    6075 }
    6076 #endif
    6077 
    6078 void WebPageProxy::checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength)
    6079 {
     6072void WebPageProxy::checkTextOfParagraph(const String& text, OptionSet<TextCheckingType> checkingTypes, int32_t insertionPoint, CompletionHandler<void(Vector<WebCore::TextCheckingResult>&&)>&& completionHandler)
     6073{
     6074    completionHandler(TextChecker::checkTextOfParagraph(spellDocumentTag(), text, insertionPoint, checkingTypes, m_initialCapitalizationEnabled));
     6075}
     6076#endif
     6077
     6078void WebPageProxy::checkSpellingOfString(const String& text, CompletionHandler<void(int32_t misspellingLocation, int32_t misspellingLength)>&& completionHandler)
     6079{
     6080    int32_t misspellingLocation = 0;
     6081    int32_t misspellingLength = 0;
    60806082    TextChecker::checkSpellingOfString(spellDocumentTag(), text, misspellingLocation, misspellingLength);
    6081 }
    6082 
    6083 void WebPageProxy::checkGrammarOfString(const String& text, Vector<GrammarDetail>& grammarDetails, int32_t& badGrammarLocation, int32_t& badGrammarLength)
    6084 {
     6083    completionHandler(misspellingLocation, misspellingLength);
     6084}
     6085
     6086void WebPageProxy::checkGrammarOfString(const String& text, CompletionHandler<void(Vector<WebCore::GrammarDetail>&&, int32_t badGrammarLocation, int32_t badGrammarLength)>&& completionHandler)
     6087{
     6088    Vector<GrammarDetail> grammarDetails;
     6089    int32_t badGrammarLocation = 0;
     6090    int32_t badGrammarLength = 0;
    60856091    TextChecker::checkGrammarOfString(spellDocumentTag(), text, grammarDetails, badGrammarLocation, badGrammarLength);
    6086 }
    6087 
    6088 void WebPageProxy::spellingUIIsShowing(bool& isShowing)
    6089 {
    6090     isShowing = TextChecker::spellingUIIsShowing();
     6092    completionHandler(WTFMove(grammarDetails), badGrammarLocation, badGrammarLength);
     6093}
     6094
     6095void WebPageProxy::spellingUIIsShowing(CompletionHandler<void(bool)>&& completionHandler)
     6096{
     6097    completionHandler(TextChecker::spellingUIIsShowing());
    60916098}
    60926099
     
    61016108}
    61026109
    6103 void WebPageProxy::getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses)
    6104 {
     6110void WebPageProxy::getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
     6111{
     6112    Vector<String> guesses;
    61056113    TextChecker::getGuessesForWord(spellDocumentTag(), word, context, insertionPoint, guesses, m_initialCapitalizationEnabled);
     6114    completionHandler(WTFMove(guesses));
    61066115}
    61076116
     
    76027611#if PLATFORM(MAC)
    76037612
    7604 void WebPageProxy::substitutionsPanelIsShowing(bool& isShowing)
    7605 {
    7606     isShowing = TextChecker::substitutionsPanelIsShowing();
     7613void WebPageProxy::substitutionsPanelIsShowing(CompletionHandler<void(bool)>&& completionHandler)
     7614{
     7615    completionHandler(TextChecker::substitutionsPanelIsShowing());
    76077616}
    76087617
    76097618void WebPageProxy::showCorrectionPanel(int32_t panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
    76107619{
     7620    // FIXME: Make AlternativeTextType an enum class with EnumTraits and serialize it instead of casting to/from an int32_t.
    76117621    pageClient().showCorrectionPanel((AlternativeTextType)panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
    76127622}
     
    76147624void WebPageProxy::dismissCorrectionPanel(int32_t reason)
    76157625{
     7626    // FIXME: Make ReasonForDismissingAlternativeText an enum class with EnumTraits and serialize it instead of casting to/from an int32_t.
    76167627    pageClient().dismissCorrectionPanel((ReasonForDismissingAlternativeText)reason);
    76177628}
    76187629
    7619 void WebPageProxy::dismissCorrectionPanelSoon(int32_t reason, String& result)
    7620 {
    7621     result = pageClient().dismissCorrectionPanelSoon((ReasonForDismissingAlternativeText)reason);
     7630void WebPageProxy::dismissCorrectionPanelSoon(int32_t reason, CompletionHandler<void(String)>&& completionHandler)
     7631{
     7632    // FIXME: Make ReasonForDismissingAlternativeText an enum class with EnumTraits and serialize it instead of casting to/from an int32_t.
     7633    completionHandler(pageClient().dismissCorrectionPanelSoon((ReasonForDismissingAlternativeText)reason));
    76227634}
    76237635
    76247636void WebPageProxy::recordAutocorrectionResponse(int32_t response, const String& replacedString, const String& replacementString)
    76257637{
     7638    // FIXME: Make AutocorrectionResponse an enum class with EnumTraits and serialize it instead of casting to/from an int32_t.
    76267639    pageClient().recordAutocorrectionResponse(static_cast<AutocorrectionResponse>(response), replacedString, replacementString);
    76277640}
     
    76447657}
    76457658
    7646 void WebPageProxy::dictationAlternatives(uint64_t dictationContext, Vector<String>& result)
    7647 {
    7648     result = pageClient().dictationAlternatives(dictationContext);
     7659void WebPageProxy::dictationAlternatives(uint64_t dictationContext, CompletionHandler<void(Vector<String>&&)>&& completionHandler)
     7660{
     7661    completionHandler(pageClient().dictationAlternatives(dictationContext));
    76497662}
    76507663#endif
     
    77267739
    77277740#if ENABLE(WEB_CRYPTO)
    7728 void WebPageProxy::wrapCryptoKey(const Vector<uint8_t>& key, bool& succeeded, Vector<uint8_t>& wrappedKey)
     7741void WebPageProxy::wrapCryptoKey(const Vector<uint8_t>& key, CompletionHandler<void(bool, Vector<uint8_t>&&)>&& completionHandler)
    77297742{
    77307743    PageClientProtector protector(pageClient());
     
    77357748        masterKey = keyData->dataReference().vector();
    77367749
    7737     succeeded = wrapSerializedCryptoKey(masterKey, key, wrappedKey);
    7738 }
    7739 
    7740 void WebPageProxy::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, bool& succeeded, Vector<uint8_t>& key)
     7750    Vector<uint8_t> wrappedKey;
     7751    bool succeeded = wrapSerializedCryptoKey(masterKey, key, wrappedKey);
     7752    completionHandler(succeeded, WTFMove(wrappedKey));
     7753}
     7754
     7755void WebPageProxy::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, CompletionHandler<void(bool, Vector<uint8_t>&&)>&& completionHandler)
    77417756{
    77427757    PageClientProtector protector(pageClient());
     
    77477762        masterKey = keyData->dataReference().vector();
    77487763
    7749     succeeded = unwrapSerializedCryptoKey(masterKey, wrappedKey, key);
    7750 }
    7751 #endif
    7752 
    7753 void WebPageProxy::signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL& url, String& result)
     7764    Vector<uint8_t> key;
     7765    bool succeeded = unwrapSerializedCryptoKey(masterKey, wrappedKey, key);
     7766    completionHandler(succeeded, WTFMove(key));
     7767}
     7768#endif
     7769
     7770void WebPageProxy::signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL& url, CompletionHandler<void(String)>&& completionHandler)
    77547771{
    77557772    PageClientProtector protector(pageClient());
    77567773
    77577774    if (auto apiString = m_navigationClient->signedPublicKeyAndChallengeString(*this, keySizeIndex, API::String::create(challengeString), url))
    7758         result = apiString->string();
     7775        return completionHandler(apiString->string());
     7776   
     7777    completionHandler({ });
    77597778}
    77607779
     
    85978616}
    85988617
    8599 void WebPageProxy::serializedAttachmentDataForIdentifiers(const Vector<String>& identifiers, Vector<WebCore::SerializedAttachmentData>& serializedData)
    8600 {
     8618void WebPageProxy::serializedAttachmentDataForIdentifiers(const Vector<String>& identifiers, CompletionHandler<void(Vector<WebCore::SerializedAttachmentData>&&)>&& completionHandler)
     8619{
     8620    Vector<WebCore::SerializedAttachmentData> serializedData;
    86018621    for (const auto& identifier : identifiers) {
    86028622        auto attachment = attachmentForIdentifier(identifier);
     
    86108630        serializedData.append({ identifier, attachment->mimeType(), data.releaseNonNull() });
    86118631    }
     8632    completionHandler(WTFMove(serializedData));
    86128633}
    86138634
     
    88408861}
    88418862
    8842 void WebPageProxy::speechSynthesisVoiceList(Vector<WebSpeechSynthesisVoice>& result)
     8863void WebPageProxy::speechSynthesisVoiceList(CompletionHandler<void(Vector<WebSpeechSynthesisVoice>&&)>&& completionHandler)
    88438864{
    88448865    auto& voiceList = speechSynthesisData().synthesizer->voiceList();
    8845     for (auto& voice : voiceList) {
    8846         WebSpeechSynthesisVoice v { voice->voiceURI(), voice->name(), voice->lang(), voice->localService(), voice->isDefault() };
    8847         result.append(WTFMove(v));
    8848     }
     8866    Vector<WebSpeechSynthesisVoice> result;
     8867    result.reserveInitialCapacity(voiceList.size());
     8868    for (auto& voice : voiceList)
     8869        result.uncheckedAppend(WebSpeechSynthesisVoice { voice->voiceURI(), voice->name(), voice->lang(), voice->localService(), voice->isDefault() });
     8870    completionHandler(WTFMove(result));
    88498871}
    88508872
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r243319 r243327  
    11551155
    11561156#if ENABLE(PDFKIT_PLUGIN)
    1157     void showPDFContextMenu(const WebKit::PDFContextMenu&, Optional<int32_t>& selectedIndex);
     1157    void showPDFContextMenu(const WebKit::PDFContextMenu&, CompletionHandler<void(Optional<int32_t>&&)>&&);
    11581158#endif
    11591159    WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; }
     
    11611161    uint64_t renderTreeSize() const { return m_renderTreeSize; }
    11621162
    1163     void printMainFrame();
    1164    
    11651163    void setMediaVolume(float);
    11661164    void setMuted(WebCore::MediaProducer::MutedStateFlags);
     
    12601258
    12611259#if ENABLE(WEB_CRYPTO)
    1262     void wrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
    1263     void unwrapCryptoKey(const Vector<uint8_t>&, bool& succeeded, Vector<uint8_t>&);
    1264 #endif
    1265 
    1266     void signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL&, String& result);
     1260    void wrapCryptoKey(const Vector<uint8_t>&, CompletionHandler<void(bool, Vector<uint8_t>&&)>&&);
     1261    void unwrapCryptoKey(const Vector<uint8_t>&, CompletionHandler<void(bool, Vector<uint8_t>&&)>&&);
     1262#endif
     1263
     1264    void signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL&, CompletionHandler<void(String)>&&);
    12671265
    12681266    void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, WTF::Function<void (const ShareableBitmap::Handle&, CallbackBase::Error)>&&);
     
    13241322
    13251323#if USE(UNIFIED_TEXT_CHECKING)
    1326     void checkTextOfParagraph(const String& text, OptionSet<WebCore::TextCheckingType> checkingTypes, int32_t insertionPoint, Vector<WebCore::TextCheckingResult>& results);
    1327 #endif
    1328     void getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses);
     1324    void checkTextOfParagraph(const String& text, OptionSet<WebCore::TextCheckingType> checkingTypes, int32_t insertionPoint, CompletionHandler<void(Vector<WebCore::TextCheckingResult>&&)>&&);
     1325#endif
     1326    void getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, CompletionHandler<void(Vector<String>&&)>&&);
    13291327
    13301328    void setShouldDispatchFakeMouseMoveEvents(bool);
     
    14341432    void insertAttachment(Ref<API::Attachment>&&, Function<void(CallbackBase::Error)>&&);
    14351433    void updateAttachmentAttributes(const API::Attachment&, Function<void(CallbackBase::Error)>&&);
    1436     void serializedAttachmentDataForIdentifiers(const Vector<String>&, Vector<WebCore::SerializedAttachmentData>&);
     1434    void serializedAttachmentDataForIdentifiers(const Vector<String>&, CompletionHandler<void(Vector<WebCore::SerializedAttachmentData>&&)>&&);
    14371435    void registerAttachmentIdentifier(const String&);
    14381436    void didInvalidateDataForAttachment(API::Attachment&);
     
    14841482    void loadDataWithNavigationShared(Ref<WebProcessProxy>&&, API::Navigation&, const IPC::DataReference&, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&& = WTF::nullopt);
    14851483    void loadRequestWithNavigationShared(Ref<WebProcessProxy>&&, API::Navigation&, WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&& = WTF::nullopt);
    1486     void backForwardGoToItemShared(Ref<WebProcessProxy>&&, const WebCore::BackForwardItemIdentifier&, SandboxExtension::Handle&);
     1484    void backForwardGoToItemShared(Ref<WebProcessProxy>&&, const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&);
    14871485    void decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&,
    14881486        FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody,
     
    14961494
    14971495#if ENABLE(SPEECH_SYNTHESIS)
    1498     void speechSynthesisVoiceList(Vector<WebSpeechSynthesisVoice>& result);
     1496    void speechSynthesisVoiceList(CompletionHandler<void(Vector<WebSpeechSynthesisVoice>&&)>&&);
    14991497    void speechSynthesisSpeak(const String&, const String&, float volume, float rate, float pitch, MonotonicTime startTime, const String& voiceURI, const String& voiceName, const String& voiceLang, bool localService, bool defaultVoice, CompletionHandler<void()>&&);
    15001498    void speechSynthesisCancel();
     
    15871585    void setNetworkRequestsInProgress(bool);
    15881586
    1589     void hasInsecureContent(WebCore::HasInsecureContent&);
     1587    void hasInsecureContent(CompletionHandler<void(WebCore::HasInsecureContent)>&&);
    15901588
    15911589    void didDestroyNavigation(uint64_t navigationID);
     
    16431641    void screenToRootView(const WebCore::IntPoint& screenPoint, Messages::WebPageProxy::ScreenToRootView::DelayedReply&&);
    16441642    void rootViewToScreen(const WebCore::IntRect& viewRect, Messages::WebPageProxy::RootViewToScreen::DelayedReply&&);
    1645     void accessibilityScreenToRootView(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
    1646     void rootViewToAccessibilityScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
     1643    void accessibilityScreenToRootView(const WebCore::IntPoint& screenPoint, CompletionHandler<void(WebCore::IntPoint)>&&);
     1644    void rootViewToAccessibilityScreen(const WebCore::IntRect& viewRect, CompletionHandler<void(WebCore::IntRect)>&&);
    16471645    void runBeforeUnloadConfirmPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const String& message, Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&&);
    16481646    void didChangeViewportProperties(const WebCore::ViewportAttributes&);
     
    16501648    void runOpenPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&);
    16511649    void showShareSheet(const WebCore::ShareDataWithParsedURL&, ShareSheetCallbackID);
    1652     void printFrame(uint64_t frameID);
     1650    void printFrame(uint64_t frameID, CompletionHandler<void()>&&);
    16531651    void exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&&);
    16541652    void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply&&);
     
    17171715    // Back/Forward list management
    17181716    void backForwardAddItem(BackForwardListItemState&&);
    1719     void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, SandboxExtension::Handle&);
    1720     void backForwardItemAtIndex(int32_t index, Optional<WebCore::BackForwardItemIdentifier>&);
    1721     void backForwardBackListCount(uint32_t& count);
    1722     void backForwardForwardListCount(uint32_t& count);
     1717    void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&);
     1718    void backForwardItemAtIndex(int32_t index, CompletionHandler<void(Optional<WebCore::BackForwardItemIdentifier>&&)>&&);
     1719    void backForwardBackListCount(CompletionHandler<void(uint32_t)>&&);
     1720    void backForwardForwardListCount(CompletionHandler<void(uint32_t)>&&);
    17231721    void backForwardClear();
    17241722
     
    17271725    void registerInsertionUndoGrouping();
    17281726    void clearAllEditCommands();
    1729     void canUndoRedo(UndoOrRedo, bool& result);
    1730     void executeUndoRedo(UndoOrRedo);
     1727    void canUndoRedo(UndoOrRedo, CompletionHandler<void(bool)>&&);
     1728    void executeUndoRedo(UndoOrRedo, CompletionHandler<void()>&&);
    17311729
    17321730    // Keyboard handling
    17331731#if PLATFORM(COCOA)
    1734     void executeSavedCommandBySelector(const String& selector, bool& handled);
     1732    void executeSavedCommandBySelector(const String& selector, CompletionHandler<void(bool)>&&);
    17351733#endif
    17361734
     
    17561754    // Search popup results
    17571755    void saveRecentSearches(const String&, const Vector<WebCore::RecentSearch>&);
    1758     void loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&);
     1756    void loadRecentSearches(const String&, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&&);
    17591757
    17601758#if PLATFORM(COCOA)
    17611759    // Speech.
    1762     void getIsSpeaking(bool&);
     1760    void getIsSpeaking(CompletionHandler<void(bool)>&&);
    17631761    void speak(const String&);
    17641762    void stopSpeaking();
     
    17831781
    17841782    // Spelling and grammar.
    1785     void checkSpellingOfString(const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
    1786     void checkGrammarOfString(const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
    1787     void spellingUIIsShowing(bool&);
     1783    void checkSpellingOfString(const String& text, CompletionHandler<void(int32_t misspellingLocation, int32_t misspellingLength)>&&);
     1784    void checkGrammarOfString(const String& text, CompletionHandler<void(Vector<WebCore::GrammarDetail>&&, int32_t badGrammarLocation, int32_t badGrammarLength)>&&);
     1785    void spellingUIIsShowing(CompletionHandler<void(bool)>&&);
    17881786    void updateSpellingUIWithMisspelledWord(const String& misspelledWord);
    17891787    void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&);
     
    18261824    void autocorrectionContextCallback(const WebAutocorrectionContext&, CallbackID);
    18271825    void selectionContextCallback(const String& selectedText, const String& beforeText, const String& afterText, CallbackID);
    1828     void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled);
     1826    void interpretKeyEvent(const EditorState&, bool isCharEvent, CompletionHandler<void(bool)>&&);
    18291827    void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect, WebCore::RouteSharingPolicy, const String&);
    18301828    void selectionRectsCallback(const Vector<WebCore::SelectionRect>&, CallbackID);
     
    18571855
    18581856#if PLATFORM(MAC)
    1859     void substitutionsPanelIsShowing(bool&);
     1857    void substitutionsPanelIsShowing(CompletionHandler<void(bool)>&&);
    18601858    void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
    18611859    void dismissCorrectionPanel(int32_t reason);
    1862     void dismissCorrectionPanelSoon(int32_t reason, String& result);
     1860    void dismissCorrectionPanelSoon(int32_t reason, CompletionHandler<void(String)>&&);
    18631861    void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
    18641862
     
    18661864    void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext);
    18671865    void removeDictationAlternatives(uint64_t dictationContext);
    1868     void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);
     1866    void dictationAlternatives(uint64_t dictationContext, CompletionHandler<void(Vector<String>&&)>&&);
    18691867#endif
    18701868
     
    19101908
    19111909#if PLATFORM(X11)
    1912     void createPluginContainer(uint64_t& windowID);
     1910    void createPluginContainer(CompletionHandler<void(uint64_t)>&&);
    19131911    void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID);
    19141912    void windowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID);
     
    19751973
    19761974    void handleMessage(IPC::Connection&, const String& messageName, const UserData& messageBody);
    1977     void handleSynchronousMessage(IPC::Connection&, const String& messageName, const UserData& messageBody, UserData& returnUserData);
     1975    void handleSynchronousMessage(IPC::Connection&, const String& messageName, const UserData& messageBody, CompletionHandler<void(UserData&&)>&&);
    19781976
    19791977    void viewIsBecomingVisible();
  • trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in

    r243319 r243327  
    6262    ScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint) Delayed
    6363    RootViewToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame) Delayed
    64     AccessibilityScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint) LegacySync
    65     RootViewToAccessibilityScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame) LegacySync
     64    AccessibilityScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint) Delayed
     65    RootViewToAccessibilityScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame) Delayed
    6666
    6767#if PLATFORM(COCOA)
     
    7474    RunOpenPanel(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, struct WebCore::FileChooserSettings parameters)
    7575    ShowShareSheet(struct WebCore::ShareDataWithParsedURL shareData, uint64_t callbackID)
    76     PrintFrame(uint64_t frameID) -> () LegacySync
     76    PrintFrame(uint64_t frameID) -> () Delayed
    7777    RunModal()
    7878    NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb)
     
    144144    DidDestroyNavigation(uint64_t navigationID)
    145145
    146     HasInsecureContent() -> (enum:bool WebCore::HasInsecureContent hasInsecureContent) LegacySync
     146    HasInsecureContent() -> (enum:bool WebCore::HasInsecureContent hasInsecureContent) Delayed
    147147
    148148    MainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture)
     
    188188    AutocorrectionContextCallback(struct WebKit::WebAutocorrectionContext context, WebKit::CallbackID callbackID)
    189189    SelectionContextCallback(String selectedText, String beforeText, String afterText, WebKit::CallbackID callbackID)
    190     InterpretKeyEvent(struct WebKit::EditorState state, bool isCharEvent) -> (bool handled) LegacySync
     190    InterpretKeyEvent(struct WebKit::EditorState state, bool isCharEvent) -> (bool handled) Delayed
    191191    DidReceivePositionInformation(struct WebKit::InteractionInformationAtPosition information)
    192192    SaveImageToLibrary(WebKit::SharedMemory::Handle handle, uint64_t size)
     
    224224    # BackForward messages
    225225    BackForwardAddItem(struct WebKit::BackForwardListItemState itemState)
    226     BackForwardGoToItem(struct WebCore::BackForwardItemIdentifier itemID) -> (WebKit::SandboxExtension::Handle sandboxExtensionHandle) LegacySync
    227     BackForwardItemAtIndex(int32_t itemIndex) -> (Optional<WebCore::BackForwardItemIdentifier> itemID) LegacySync
    228     BackForwardBackListCount() -> (uint32_t count) LegacySync
    229     BackForwardForwardListCount() -> (uint32_t count) LegacySync
     226    BackForwardGoToItem(struct WebCore::BackForwardItemIdentifier itemID) -> (WebKit::SandboxExtension::Handle sandboxExtensionHandle) Delayed
     227    BackForwardItemAtIndex(int32_t itemIndex) -> (Optional<WebCore::BackForwardItemIdentifier> itemID) Delayed
     228    BackForwardBackListCount() -> (uint32_t count) Delayed
     229    BackForwardForwardListCount() -> (uint32_t count) Delayed
    230230    BackForwardClear()
    231231    WillGoToBackForwardListItem(struct WebCore::BackForwardItemIdentifier itemID, bool inPageCache)
     
    235235    ClearAllEditCommands()
    236236    RegisterInsertionUndoGrouping()
    237     CanUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> (bool result) LegacySync
    238     ExecuteUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> () LegacySync
     237    CanUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> (bool result) Delayed
     238    ExecuteUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> () Delayed
    239239
    240240    # Diagnostic messages logging
     
    297297    # Spelling and grammar messages
    298298#if USE(UNIFIED_TEXT_CHECKING) 
    299     CheckTextOfParagraph(String text, OptionSet<WebCore::TextCheckingType> checkingTypes, int32_t insertionPoint) -> (Vector<WebCore::TextCheckingResult> results) LegacySync
    300 #endif
    301     CheckSpellingOfString(String text) -> (int32_t misspellingLocation, int32_t misspellingLength) LegacySync
    302     CheckGrammarOfString(String text) -> (Vector<WebCore::GrammarDetail> results, int32_t badGrammarLocation, int32_t badGrammarLength) LegacySync
    303     SpellingUIIsShowing() -> (bool isShowing) LegacySync
     299    CheckTextOfParagraph(String text, OptionSet<WebCore::TextCheckingType> checkingTypes, int32_t insertionPoint) -> (Vector<WebCore::TextCheckingResult> results) Delayed
     300#endif
     301    CheckSpellingOfString(String text) -> (int32_t misspellingLocation, int32_t misspellingLength) Delayed
     302    CheckGrammarOfString(String text) -> (Vector<WebCore::GrammarDetail> results, int32_t badGrammarLocation, int32_t badGrammarLength) Delayed
     303    SpellingUIIsShowing() -> (bool isShowing) Delayed
    304304    UpdateSpellingUIWithMisspelledWord(String misspelledWord)
    305305    UpdateSpellingUIWithGrammarString(String badGrammarPhrase, struct WebCore::GrammarDetail grammarDetail)
    306     GetGuessesForWord(String word, String context, int32_t insertionPoint) -> (Vector<String> guesses) LegacySync
     306    GetGuessesForWord(String word, String context, int32_t insertionPoint) -> (Vector<String> guesses) Delayed
    307307    LearnWord(String word)
    308308    IgnoreWord(String word)
     
    337337
    338338    # Keyboard input support messages
    339     ExecuteSavedCommandBySelector(String selector) -> (bool handled) LegacySync
     339    ExecuteSavedCommandBySelector(String selector) -> (bool handled) Delayed
    340340
    341341    # Remote accessibility messages
     
    347347
    348348    # Speech messages
    349     GetIsSpeaking() -> (bool isSpeaking) LegacySync
     349    GetIsSpeaking() -> (bool isSpeaking) Delayed
    350350    Speak(String string)
    351351    StopSpeaking()
     
    365365
    366366#if USE(APPKIT)
    367     SubstitutionsPanelIsShowing() -> (bool isShowing) LegacySync
     367    SubstitutionsPanelIsShowing() -> (bool isShowing) Delayed
    368368#endif
    369369#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     
    378378    ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> alternativeReplacementStrings)
    379379    DismissCorrectionPanel(int32_t reason)
    380     DismissCorrectionPanelSoon(int32_t reason) -> (String result) LegacySync
     380    DismissCorrectionPanelSoon(int32_t reason) -> (String result) Delayed
    381381    RecordAutocorrectionResponse(int32_t response, String replacedString, String replacementString);
    382382
     
    387387    ShowDictationAlternativeUI(WebCore::FloatRect boundingBoxOfDictatedText, uint64_t dictationContext)
    388388    RemoveDictationAlternatives(uint64_t dictationContext)
    389     DictationAlternatives(uint64_t dictationContext) -> (Vector<String> alternatives) LegacySync
     389    DictationAlternatives(uint64_t dictationContext) -> (Vector<String> alternatives) Delayed
    390390#endif
    391391
    392392#if PLATFORM(X11)
    393393    # X11 windowed plugin messages
    394     CreatePluginContainer() -> (uint64_t windowID) LegacySync
     394    CreatePluginContainer() -> (uint64_t windowID) Delayed
    395395    WindowedPluginGeometryDidChange(WebCore::IntRect frameRect, WebCore::IntRect clipRect, uint64_t windowID)
    396396    WindowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID)
     
    430430    # Search popup menus
    431431    SaveRecentSearches(String name, Vector<WebCore::RecentSearch> searchItems)
    432     LoadRecentSearches(String name) -> (Vector<WebCore::RecentSearch> result) LegacySync
     432    LoadRecentSearches(String name) -> (Vector<WebCore::RecentSearch> result) Delayed
    433433
    434434    SavePDFToFileInDownloadsFolder(String suggestedFilename, URL originatingURL, IPC::DataReference data)
     
    440440
    441441#if ENABLE(PDFKIT_PLUGIN)
    442     ShowPDFContextMenu(struct WebKit::PDFContextMenu contextMenu) -> (Optional<int32_t> selectedItem) LegacySync
     442    ShowPDFContextMenu(struct WebKit::PDFContextMenu contextMenu) -> (Optional<int32_t> selectedItem) Delayed
    443443#endif
    444444
     
    452452
    453453#if ENABLE(WEB_CRYPTO)
    454     WrapCryptoKey(Vector<uint8_t> key) -> (bool succeeded, Vector<uint8_t> wrappedKey) LegacySync
    455     UnwrapCryptoKey(Vector<uint8_t> wrappedKey) -> (bool succeeded, Vector<uint8_t> key) LegacySync
     454    WrapCryptoKey(Vector<uint8_t> key) -> (bool succeeded, Vector<uint8_t> wrappedKey) Delayed
     455    UnwrapCryptoKey(Vector<uint8_t> wrappedKey) -> (bool succeeded, Vector<uint8_t> key) Delayed
    456456#endif
    457457
     
    486486#endif
    487487    HandleMessage(String messageName, WebKit::UserData messageBody) WantsConnection
    488     HandleSynchronousMessage(String messageName, WebKit::UserData messageBody) -> (WebKit::UserData returnData) LegacySync WantsConnection
     488    HandleSynchronousMessage(String messageName, WebKit::UserData messageBody) -> (WebKit::UserData returnData) Delayed WantsConnection
    489489
    490490    HandleAutoFillButtonClick(WebKit::UserData userData)
     
    547547    DidInsertAttachmentWithIdentifier(String identifier, String source, bool hasEnclosingImage)
    548548    DidRemoveAttachmentWithIdentifier(String identifier)
    549     SerializedAttachmentDataForIdentifiers(Vector<String> identifiers) -> (Vector<WebCore::SerializedAttachmentData> seralizedData) LegacySync
    550 #endif
    551 
    552     SignedPublicKeyAndChallengeString(unsigned keySizeIndex, String challengeString, URL url) -> (String result) LegacySync
     549    SerializedAttachmentDataForIdentifiers(Vector<String> identifiers) -> (Vector<WebCore::SerializedAttachmentData> seralizedData) Delayed
     550#endif
     551
     552    SignedPublicKeyAndChallengeString(unsigned keySizeIndex, String challengeString, URL url) -> (String result) Delayed
    553553
    554554#if ENABLE(SPEECH_SYNTHESIS)
    555     SpeechSynthesisVoiceList() -> (Vector<WebKit::WebSpeechSynthesisVoice> voiceList) LegacySync
     555    SpeechSynthesisVoiceList() -> (Vector<WebKit::WebSpeechSynthesisVoice> voiceList) Delayed
    556556    SpeechSynthesisSpeak(String text, String lang, float volume, float rate, float pitch, MonotonicTime startTime, String voiceURI, String voiceName, String voiceLang, bool localService, bool defaultVoice) -> () Async
    557557    SpeechSynthesisCancel()
  • trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp

    r240712 r243327  
    6666}
    6767
    68 void WebPageProxy::loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&)
     68void WebPageProxy::loadRecentSearches(const String&, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler)
    6969{
    7070    notImplemented();
     71    completionHandler({ });
    7172}
    7273
     
    103104}
    104105
    105 void WebPageProxy::createPluginContainer(uint64_t& windowID)
     106void WebPageProxy::createPluginContainer(CompletionHandler<void(uint64_t)>&& completionHandler)
    106107{
    107108    RELEASE_ASSERT(WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11);
     
    110111    gtk_container_add(GTK_CONTAINER(viewWidget()), socket);
    111112
    112     windowID = static_cast<uint64_t>(gtk_socket_get_id(GTK_SOCKET(socket)));
     113    uint64_t windowID = static_cast<uint64_t>(gtk_socket_get_id(GTK_SOCKET(socket)));
    113114    pluginWindowMap().set(windowID, socket);
     115    completionHandler(windowID);
    114116}
    115117
  • trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r243102 r243327  
    7979}
    8080
    81 void WebPageProxy::getIsSpeaking(bool&)
    82 {
    83     notImplemented();
     81void WebPageProxy::getIsSpeaking(CompletionHandler<void(bool)>&& completionHandler)
     82{
     83    notImplemented();
     84    completionHandler(false);
    8485}
    8586
     
    742743}
    743744
    744 void WebPageProxy::interpretKeyEvent(const EditorState& state, bool isCharEvent, bool& handled)
     745void WebPageProxy::interpretKeyEvent(const EditorState& state, bool isCharEvent, CompletionHandler<void(bool)>&& completionHandler)
    745746{
    746747    m_editorState = state;
    747     handled = pageClient().interpretKeyEvent(m_keyEventQueue.first(), isCharEvent);
     748    completionHandler(pageClient().interpretKeyEvent(m_keyEventQueue.first(), isCharEvent));
    748749}
    749750
     
    792793}
    793794
    794 void WebPageProxy::executeSavedCommandBySelector(const String&, bool&)
    795 {
    796     notImplemented();
     795void WebPageProxy::executeSavedCommandBySelector(const String&, CompletionHandler<void(bool)>&& completionHandler)
     796{
     797    notImplemented();
     798    completionHandler(false);
    797799}
    798800
  • trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm

    r243094 r243327  
    132132}
    133133
    134 void WebPageProxy::getIsSpeaking(bool& isSpeaking)
     134void WebPageProxy::getIsSpeaking(CompletionHandler<void(bool)>&& completionHandler)
    135135{
    136136    ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer));
    137     isSpeaking = [NSApp isSpeaking];
     137    completionHandler([NSApp isSpeaking]);
    138138}
    139139
     
    405405}
    406406
    407 void WebPageProxy::executeSavedCommandBySelector(const String& selector, bool& handled)
     407void WebPageProxy::executeSavedCommandBySelector(const String& selector, CompletionHandler<void(bool)>&& completionHandler)
    408408{
    409409    MESSAGE_CHECK(isValidKeypressCommandName(selector));
    410410
    411     handled = pageClient().executeSavedCommandBySelector(selector);
     411    completionHandler(pageClient().executeSavedCommandBySelector(selector));
    412412}
    413413
     
    549549
    550550#if ENABLE(PDFKIT_PLUGIN)
    551 void WebPageProxy::showPDFContextMenu(const WebKit::PDFContextMenu& contextMenu, Optional<int32_t>& selectedIndex)
     551void WebPageProxy::showPDFContextMenu(const WebKit::PDFContextMenu& contextMenu, CompletionHandler<void(Optional<int32_t>&&)>&& completionHandler)
    552552{
    553553    if (!contextMenu.m_items.size())
    554         return;
     554        return completionHandler(WTF::nullopt);
    555555   
    556556    RetainPtr<WKPDFMenuTarget> menuTarget = adoptNS([[WKPDFMenuTarget alloc] init]);
     
    585585
    586586    if (auto selectedMenuItem = [menuTarget selectedMenuItem])
    587         selectedIndex = [selectedMenuItem tag];
     587        return completionHandler([selectedMenuItem tag]);
     588    completionHandler(WTF::nullopt);
    588589}
    589590#endif
  • trunk/Source/WebKit/UIProcess/win/WebPageProxyWin.cpp

    r237308 r243327  
    5151}
    5252
    53 void WebPageProxy::loadRecentSearches(const String& name, Vector<WebCore::RecentSearch>& searchItems)
     53void WebPageProxy::loadRecentSearches(const String& name, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler)
    5454{
    5555    if (!name)
    56         return;
     56        return completionHandler({ });
    5757
    58     return WebCore::SearchPopupMenuDB::singleton().loadRecentSearches(name, searchItems);
     58    Vector<WebCore::RecentSearch> searchItems;
     59    WebCore::SearchPopupMenuDB::singleton().loadRecentSearches(name, searchItems);
     60    completionHandler(WTFMove(searchItems));
    5961}
    6062
  • trunk/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp

    r235903 r243327  
    5454}
    5555
    56 void WebPageProxy::loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&)
     56void WebPageProxy::loadRecentSearches(const String&, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler)
    5757{
    5858    notImplemented();
     59    completionHandler({ });
    5960}
    6061
Note: See TracChangeset for help on using the changeset viewer.