Changeset 243327 in webkit
- Timestamp:
- Mar 21, 2019, 2:06:35 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r243326 r243327 1 2019-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 1 55 2019-03-21 Alex Christensen <achristensen@webkit.org> 2 56 -
trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
r243094 r243327 64 64 } 65 65 66 void WebPageProxy::loadRecentSearches(const String& name, Vector<WebCore::RecentSearch>& searchItems)66 void WebPageProxy::loadRecentSearches(const String& name, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler) 67 67 { 68 68 if (!name) { 69 69 // 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)); 74 74 } 75 75 -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
r243159 r243327 304 304 } 305 305 306 void ProvisionalPageProxy::backForwardGoToItem(const WebCore::BackForwardItemIdentifier& identifier, SandboxExtension::Handle& handle)307 { 308 m_page.backForwardGoToItemShared(m_process.copyRef(), identifier, handle);306 void ProvisionalPageProxy::backForwardGoToItem(const WebCore::BackForwardItemIdentifier& identifier, CompletionHandler<void(SandboxExtension::Handle&&)>&& completionHandler) 307 { 308 m_page.backForwardGoToItemShared(m_process.copyRef(), identifier, WTFMove(completionHandler)); 309 309 } 310 310 … … 446 446 { 447 447 if (decoder.messageName() == Messages::WebPageProxy::BackForwardGoToItem::name()) { 448 IPC::handleMessage LegacySync<Messages::WebPageProxy::BackForwardGoToItem>(decoder, *replyEncoder, this, &ProvisionalPageProxy::backForwardGoToItem);448 IPC::handleMessageDelayed<Messages::WebPageProxy::BackForwardGoToItem>(connection, decoder, replyEncoder, this, &ProvisionalPageProxy::backForwardGoToItem); 449 449 return; 450 450 } -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.h
r243159 r243327 103 103 void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const WebCore::ResourceError&, const UserData&); 104 104 void startURLSchemeTask(URLSchemeTaskParameters&&); 105 void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, SandboxExtension::Handle&);105 void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&); 106 106 void decidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, 107 107 FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r243319 r243327 705 705 } 706 706 707 void WebPageProxy::handleSynchronousMessage(IPC::Connection& connection, const String& messageName, const UserData& messageBody, UserData& returnUserData)707 void WebPageProxy::handleSynchronousMessage(IPC::Connection& connection, const String& messageName, const UserData& messageBody, CompletionHandler<void(UserData&&)>&& completionHandler) 708 708 { 709 709 ASSERT(m_process->connection() == &connection); 710 710 711 711 if (!m_injectedBundleClient) 712 return ;712 return completionHandler({ }); 713 713 714 714 RefPtr<API::Object> returnData; 715 715 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()))); 717 717 } 718 718 … … 3862 3862 } 3863 3863 3864 void WebPageProxy::hasInsecureContent( HasInsecureContent& hasInsecureContent)3865 { 3866 hasInsecureContent = m_pageLoadState.committedHasInsecureContent() ? HasInsecureContent::Yes : HasInsecureContent::No;3864 void WebPageProxy::hasInsecureContent(CompletionHandler<void(WebCore::HasInsecureContent)>&& completionHandler) 3865 { 3866 completionHandler(m_pageLoadState.committedHasInsecureContent() ? HasInsecureContent::Yes : HasInsecureContent::No); 3867 3867 } 3868 3868 … … 5219 5219 } 5220 5220 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);5221 void WebPageProxy::accessibilityScreenToRootView(const IntPoint& screenPoint, CompletionHandler<void(IntPoint)>&& completionHandler) 5222 { 5223 completionHandler(pageClient().accessibilityScreenToRootView(screenPoint)); 5224 } 5225 5226 void WebPageProxy::rootViewToAccessibilityScreen(const IntRect& viewRect, CompletionHandler<void(IntRect)>&& completionHandler) 5227 { 5228 completionHandler(pageClient().rootViewToAccessibilityScreen(viewRect)); 5229 5229 } 5230 5230 … … 5308 5308 } 5309 5309 5310 void WebPageProxy::printFrame(uint64_t frameID )5310 void WebPageProxy::printFrame(uint64_t frameID, CompletionHandler<void()>&& completionHandler) 5311 5311 { 5312 5312 ASSERT(!m_isPerformingDOMPrintOperation); … … 5320 5320 endPrinting(); // Send a message synchronously while m_isPerformingDOMPrintOperation is still true. 5321 5321 m_isPerformingDOMPrintOperation = false; 5322 } 5323 5324 void WebPageProxy::printMainFrame() 5325 { 5326 printFrame(m_mainFrame->frameID()); 5322 5323 completionHandler(); 5327 5324 } 5328 5325 … … 5607 5604 } 5608 5605 5609 void WebPageProxy::backForwardGoToItem(const BackForwardItemIdentifier& itemID, SandboxExtension::Handle& sandboxExtensionHandle)5606 void WebPageProxy::backForwardGoToItem(const BackForwardItemIdentifier& itemID, CompletionHandler<void(SandboxExtension::Handle&&)>&& completionHandler) 5610 5607 { 5611 5608 // 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 … … 5613 5610 // Any real new load in the committed process would have cleared m_provisionalPage. 5614 5611 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 5618 void WebPageProxy::backForwardGoToItemShared(Ref<WebProcessProxy>&& process, const BackForwardItemIdentifier& itemID, CompletionHandler<void(SandboxExtension::Handle&&)>&& completionHandler) 5619 { 5620 auto* item = m_backForwardList->itemForID(itemID); 5623 5621 if (!item) 5624 return; 5625 5622 return completionHandler({ }); 5623 5624 SandboxExtension::Handle sandboxExtensionHandle; 5626 5625 bool createdExtension = maybeInitializeSandboxExtensionHandle(process, URL(URL(), item->url()), sandboxExtensionHandle); 5627 5626 if (createdExtension) 5628 5627 willAcquireUniversalFileReadSandboxExtension(process); 5629 5628 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 5632 void WebPageProxy::backForwardItemAtIndex(int32_t index, CompletionHandler<void(Optional<BackForwardItemIdentifier>&&)>&& completionHandler) 5633 { 5634 if (auto* item = m_backForwardList->itemAtIndex(index)) 5635 completionHandler(item->itemID()); 5637 5636 else 5638 itemID = WTF::nullopt;5639 } 5640 5641 void WebPageProxy::backForwardBackListCount( uint32_t& count)5642 { 5643 co unt = m_backForwardList->backListCount();5644 } 5645 5646 void WebPageProxy::backForwardForwardListCount( uint32_t& count)5647 { 5648 co unt = m_backForwardList->forwardListCount();5637 completionHandler(WTF::nullopt); 5638 } 5639 5640 void WebPageProxy::backForwardBackListCount(CompletionHandler<void(uint32_t)>&& completionHandler) 5641 { 5642 completionHandler(m_backForwardList->backListCount()); 5643 } 5644 5645 void WebPageProxy::backForwardForwardListCount(CompletionHandler<void(uint32_t)>&& completionHandler) 5646 { 5647 completionHandler(m_backForwardList->forwardListCount()); 5649 5648 } 5650 5649 … … 5670 5669 } 5671 5670 5672 void WebPageProxy::canUndoRedo(UndoOrRedo action, bool& result)5673 { 5674 result = pageClient().canUndoRedo(action);5675 } 5676 5677 void WebPageProxy::executeUndoRedo(UndoOrRedo action )5671 void WebPageProxy::canUndoRedo(UndoOrRedo action, CompletionHandler<void(bool)>&& completionHandler) 5672 { 5673 completionHandler(pageClient().canUndoRedo(action)); 5674 } 5675 5676 void WebPageProxy::executeUndoRedo(UndoOrRedo action, CompletionHandler<void()>&& completionHandler) 5678 5677 { 5679 5678 pageClient().executeUndoRedo(action); 5679 completionHandler(); 5680 5680 } 5681 5681 … … 6070 6070 6071 6071 #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 { 6072 void 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 6078 void 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; 6080 6082 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 6086 void 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; 6085 6091 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 6095 void WebPageProxy::spellingUIIsShowing(CompletionHandler<void(bool)>&& completionHandler) 6096 { 6097 completionHandler(TextChecker::spellingUIIsShowing()); 6091 6098 } 6092 6099 … … 6101 6108 } 6102 6109 6103 void WebPageProxy::getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, Vector<String>& guesses) 6104 { 6110 void WebPageProxy::getGuessesForWord(const String& word, const String& context, int32_t insertionPoint, CompletionHandler<void(Vector<String>&&)>&& completionHandler) 6111 { 6112 Vector<String> guesses; 6105 6113 TextChecker::getGuessesForWord(spellDocumentTag(), word, context, insertionPoint, guesses, m_initialCapitalizationEnabled); 6114 completionHandler(WTFMove(guesses)); 6106 6115 } 6107 6116 … … 7602 7611 #if PLATFORM(MAC) 7603 7612 7604 void WebPageProxy::substitutionsPanelIsShowing( bool& isShowing)7605 { 7606 isShowing = TextChecker::substitutionsPanelIsShowing();7613 void WebPageProxy::substitutionsPanelIsShowing(CompletionHandler<void(bool)>&& completionHandler) 7614 { 7615 completionHandler(TextChecker::substitutionsPanelIsShowing()); 7607 7616 } 7608 7617 7609 7618 void WebPageProxy::showCorrectionPanel(int32_t panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) 7610 7619 { 7620 // FIXME: Make AlternativeTextType an enum class with EnumTraits and serialize it instead of casting to/from an int32_t. 7611 7621 pageClient().showCorrectionPanel((AlternativeTextType)panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings); 7612 7622 } … … 7614 7624 void WebPageProxy::dismissCorrectionPanel(int32_t reason) 7615 7625 { 7626 // FIXME: Make ReasonForDismissingAlternativeText an enum class with EnumTraits and serialize it instead of casting to/from an int32_t. 7616 7627 pageClient().dismissCorrectionPanel((ReasonForDismissingAlternativeText)reason); 7617 7628 } 7618 7629 7619 void WebPageProxy::dismissCorrectionPanelSoon(int32_t reason, String& result) 7620 { 7621 result = pageClient().dismissCorrectionPanelSoon((ReasonForDismissingAlternativeText)reason); 7630 void 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)); 7622 7634 } 7623 7635 7624 7636 void WebPageProxy::recordAutocorrectionResponse(int32_t response, const String& replacedString, const String& replacementString) 7625 7637 { 7638 // FIXME: Make AutocorrectionResponse an enum class with EnumTraits and serialize it instead of casting to/from an int32_t. 7626 7639 pageClient().recordAutocorrectionResponse(static_cast<AutocorrectionResponse>(response), replacedString, replacementString); 7627 7640 } … … 7644 7657 } 7645 7658 7646 void WebPageProxy::dictationAlternatives(uint64_t dictationContext, Vector<String>& result)7647 { 7648 result = pageClient().dictationAlternatives(dictationContext);7659 void WebPageProxy::dictationAlternatives(uint64_t dictationContext, CompletionHandler<void(Vector<String>&&)>&& completionHandler) 7660 { 7661 completionHandler(pageClient().dictationAlternatives(dictationContext)); 7649 7662 } 7650 7663 #endif … … 7726 7739 7727 7740 #if ENABLE(WEB_CRYPTO) 7728 void WebPageProxy::wrapCryptoKey(const Vector<uint8_t>& key, bool& succeeded, Vector<uint8_t>& wrappedKey)7741 void WebPageProxy::wrapCryptoKey(const Vector<uint8_t>& key, CompletionHandler<void(bool, Vector<uint8_t>&&)>&& completionHandler) 7729 7742 { 7730 7743 PageClientProtector protector(pageClient()); … … 7735 7748 masterKey = keyData->dataReference().vector(); 7736 7749 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 7755 void WebPageProxy::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, CompletionHandler<void(bool, Vector<uint8_t>&&)>&& completionHandler) 7741 7756 { 7742 7757 PageClientProtector protector(pageClient()); … … 7747 7762 masterKey = keyData->dataReference().vector(); 7748 7763 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 7770 void WebPageProxy::signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL& url, CompletionHandler<void(String)>&& completionHandler) 7754 7771 { 7755 7772 PageClientProtector protector(pageClient()); 7756 7773 7757 7774 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({ }); 7759 7778 } 7760 7779 … … 8597 8616 } 8598 8617 8599 void WebPageProxy::serializedAttachmentDataForIdentifiers(const Vector<String>& identifiers, Vector<WebCore::SerializedAttachmentData>& serializedData) 8600 { 8618 void WebPageProxy::serializedAttachmentDataForIdentifiers(const Vector<String>& identifiers, CompletionHandler<void(Vector<WebCore::SerializedAttachmentData>&&)>&& completionHandler) 8619 { 8620 Vector<WebCore::SerializedAttachmentData> serializedData; 8601 8621 for (const auto& identifier : identifiers) { 8602 8622 auto attachment = attachmentForIdentifier(identifier); … … 8610 8630 serializedData.append({ identifier, attachment->mimeType(), data.releaseNonNull() }); 8611 8631 } 8632 completionHandler(WTFMove(serializedData)); 8612 8633 } 8613 8634 … … 8840 8861 } 8841 8862 8842 void WebPageProxy::speechSynthesisVoiceList( Vector<WebSpeechSynthesisVoice>& result)8863 void WebPageProxy::speechSynthesisVoiceList(CompletionHandler<void(Vector<WebSpeechSynthesisVoice>&&)>&& completionHandler) 8843 8864 { 8844 8865 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)); 8849 8871 } 8850 8872 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r243319 r243327 1155 1155 1156 1156 #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>&&)>&&); 1158 1158 #endif 1159 1159 WebCore::IntRect visibleScrollerThumbRect() const { return m_visibleScrollerThumbRect; } … … 1161 1161 uint64_t renderTreeSize() const { return m_renderTreeSize; } 1162 1162 1163 void printMainFrame();1164 1165 1163 void setMediaVolume(float); 1166 1164 void setMuted(WebCore::MediaProducer::MutedStateFlags); … … 1260 1258 1261 1259 #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)>&&); 1267 1265 1268 1266 void takeSnapshot(WebCore::IntRect, WebCore::IntSize bitmapSize, SnapshotOptions, WTF::Function<void (const ShareableBitmap::Handle&, CallbackBase::Error)>&&); … … 1324 1322 1325 1323 #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>&&)>&&); 1329 1327 1330 1328 void setShouldDispatchFakeMouseMoveEvents(bool); … … 1434 1432 void insertAttachment(Ref<API::Attachment>&&, Function<void(CallbackBase::Error)>&&); 1435 1433 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>&&)>&&); 1437 1435 void registerAttachmentIdentifier(const String&); 1438 1436 void didInvalidateDataForAttachment(API::Attachment&); … … 1484 1482 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); 1485 1483 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&&)>&&); 1487 1485 void decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, 1488 1486 FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, … … 1496 1494 1497 1495 #if ENABLE(SPEECH_SYNTHESIS) 1498 void speechSynthesisVoiceList( Vector<WebSpeechSynthesisVoice>& result);1496 void speechSynthesisVoiceList(CompletionHandler<void(Vector<WebSpeechSynthesisVoice>&&)>&&); 1499 1497 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()>&&); 1500 1498 void speechSynthesisCancel(); … … 1587 1585 void setNetworkRequestsInProgress(bool); 1588 1586 1589 void hasInsecureContent( WebCore::HasInsecureContent&);1587 void hasInsecureContent(CompletionHandler<void(WebCore::HasInsecureContent)>&&); 1590 1588 1591 1589 void didDestroyNavigation(uint64_t navigationID); … … 1643 1641 void screenToRootView(const WebCore::IntPoint& screenPoint, Messages::WebPageProxy::ScreenToRootView::DelayedReply&&); 1644 1642 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)>&&); 1647 1645 void runBeforeUnloadConfirmPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const String& message, Messages::WebPageProxy::RunBeforeUnloadConfirmPanel::DelayedReply&&); 1648 1646 void didChangeViewportProperties(const WebCore::ViewportAttributes&); … … 1650 1648 void runOpenPanel(uint64_t frameID, const WebCore::SecurityOriginData&, const WebCore::FileChooserSettings&); 1651 1649 void showShareSheet(const WebCore::ShareDataWithParsedURL&, ShareSheetCallbackID); 1652 void printFrame(uint64_t frameID );1650 void printFrame(uint64_t frameID, CompletionHandler<void()>&&); 1653 1651 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&&); 1654 1652 void reachedApplicationCacheOriginQuota(const String& originIdentifier, uint64_t currentQuota, uint64_t totalBytesNeeded, Messages::WebPageProxy::ReachedApplicationCacheOriginQuota::DelayedReply&&); … … 1717 1715 // Back/Forward list management 1718 1716 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)>&&); 1723 1721 void backForwardClear(); 1724 1722 … … 1727 1725 void registerInsertionUndoGrouping(); 1728 1726 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()>&&); 1731 1729 1732 1730 // Keyboard handling 1733 1731 #if PLATFORM(COCOA) 1734 void executeSavedCommandBySelector(const String& selector, bool& handled);1732 void executeSavedCommandBySelector(const String& selector, CompletionHandler<void(bool)>&&); 1735 1733 #endif 1736 1734 … … 1756 1754 // Search popup results 1757 1755 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>&&)>&&); 1759 1757 1760 1758 #if PLATFORM(COCOA) 1761 1759 // Speech. 1762 void getIsSpeaking( bool&);1760 void getIsSpeaking(CompletionHandler<void(bool)>&&); 1763 1761 void speak(const String&); 1764 1762 void stopSpeaking(); … … 1783 1781 1784 1782 // 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)>&&); 1788 1786 void updateSpellingUIWithMisspelledWord(const String& misspelledWord); 1789 1787 void updateSpellingUIWithGrammarString(const String& badGrammarPhrase, const WebCore::GrammarDetail&); … … 1826 1824 void autocorrectionContextCallback(const WebAutocorrectionContext&, CallbackID); 1827 1825 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)>&&); 1829 1827 void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect, WebCore::RouteSharingPolicy, const String&); 1830 1828 void selectionRectsCallback(const Vector<WebCore::SelectionRect>&, CallbackID); … … 1857 1855 1858 1856 #if PLATFORM(MAC) 1859 void substitutionsPanelIsShowing( bool&);1857 void substitutionsPanelIsShowing(CompletionHandler<void(bool)>&&); 1860 1858 void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings); 1861 1859 void dismissCorrectionPanel(int32_t reason); 1862 void dismissCorrectionPanelSoon(int32_t reason, String& result);1860 void dismissCorrectionPanelSoon(int32_t reason, CompletionHandler<void(String)>&&); 1863 1861 void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString); 1864 1862 … … 1866 1864 void showDictationAlternativeUI(const WebCore::FloatRect& boundingBoxOfDictatedText, uint64_t dictationContext); 1867 1865 void removeDictationAlternatives(uint64_t dictationContext); 1868 void dictationAlternatives(uint64_t dictationContext, Vector<String>& result);1866 void dictationAlternatives(uint64_t dictationContext, CompletionHandler<void(Vector<String>&&)>&&); 1869 1867 #endif 1870 1868 … … 1910 1908 1911 1909 #if PLATFORM(X11) 1912 void createPluginContainer( uint64_t& windowID);1910 void createPluginContainer(CompletionHandler<void(uint64_t)>&&); 1913 1911 void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID); 1914 1912 void windowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID); … … 1975 1973 1976 1974 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&&)>&&); 1978 1976 1979 1977 void viewIsBecomingVisible(); -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r243319 r243327 62 62 ScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint) Delayed 63 63 RootViewToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame) Delayed 64 AccessibilityScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint) LegacySync65 RootViewToAccessibilityScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame) LegacySync64 AccessibilityScreenToRootView(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint) Delayed 65 RootViewToAccessibilityScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame) Delayed 66 66 67 67 #if PLATFORM(COCOA) … … 74 74 RunOpenPanel(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, struct WebCore::FileChooserSettings parameters) 75 75 ShowShareSheet(struct WebCore::ShareDataWithParsedURL shareData, uint64_t callbackID) 76 PrintFrame(uint64_t frameID) -> () LegacySync76 PrintFrame(uint64_t frameID) -> () Delayed 77 77 RunModal() 78 78 NotifyScrollerThumbIsVisibleInRect(WebCore::IntRect scrollerThumb) … … 144 144 DidDestroyNavigation(uint64_t navigationID) 145 145 146 HasInsecureContent() -> (enum:bool WebCore::HasInsecureContent hasInsecureContent) LegacySync146 HasInsecureContent() -> (enum:bool WebCore::HasInsecureContent hasInsecureContent) Delayed 147 147 148 148 MainFramePluginHandlesPageScaleGestureDidChange(bool mainFramePluginHandlesPageScaleGesture) … … 188 188 AutocorrectionContextCallback(struct WebKit::WebAutocorrectionContext context, WebKit::CallbackID callbackID) 189 189 SelectionContextCallback(String selectedText, String beforeText, String afterText, WebKit::CallbackID callbackID) 190 InterpretKeyEvent(struct WebKit::EditorState state, bool isCharEvent) -> (bool handled) LegacySync190 InterpretKeyEvent(struct WebKit::EditorState state, bool isCharEvent) -> (bool handled) Delayed 191 191 DidReceivePositionInformation(struct WebKit::InteractionInformationAtPosition information) 192 192 SaveImageToLibrary(WebKit::SharedMemory::Handle handle, uint64_t size) … … 224 224 # BackForward messages 225 225 BackForwardAddItem(struct WebKit::BackForwardListItemState itemState) 226 BackForwardGoToItem(struct WebCore::BackForwardItemIdentifier itemID) -> (WebKit::SandboxExtension::Handle sandboxExtensionHandle) LegacySync227 BackForwardItemAtIndex(int32_t itemIndex) -> (Optional<WebCore::BackForwardItemIdentifier> itemID) LegacySync228 BackForwardBackListCount() -> (uint32_t count) LegacySync229 BackForwardForwardListCount() -> (uint32_t count) LegacySync226 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 230 230 BackForwardClear() 231 231 WillGoToBackForwardListItem(struct WebCore::BackForwardItemIdentifier itemID, bool inPageCache) … … 235 235 ClearAllEditCommands() 236 236 RegisterInsertionUndoGrouping() 237 CanUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> (bool result) LegacySync238 ExecuteUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> () LegacySync237 CanUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> (bool result) Delayed 238 ExecuteUndoRedo(enum:bool WebKit::UndoOrRedo undoOrRedo) -> () Delayed 239 239 240 240 # Diagnostic messages logging … … 297 297 # Spelling and grammar messages 298 298 #if USE(UNIFIED_TEXT_CHECKING) 299 CheckTextOfParagraph(String text, OptionSet<WebCore::TextCheckingType> checkingTypes, int32_t insertionPoint) -> (Vector<WebCore::TextCheckingResult> results) LegacySync300 #endif 301 CheckSpellingOfString(String text) -> (int32_t misspellingLocation, int32_t misspellingLength) LegacySync302 CheckGrammarOfString(String text) -> (Vector<WebCore::GrammarDetail> results, int32_t badGrammarLocation, int32_t badGrammarLength) LegacySync303 SpellingUIIsShowing() -> (bool isShowing) LegacySync299 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 304 304 UpdateSpellingUIWithMisspelledWord(String misspelledWord) 305 305 UpdateSpellingUIWithGrammarString(String badGrammarPhrase, struct WebCore::GrammarDetail grammarDetail) 306 GetGuessesForWord(String word, String context, int32_t insertionPoint) -> (Vector<String> guesses) LegacySync306 GetGuessesForWord(String word, String context, int32_t insertionPoint) -> (Vector<String> guesses) Delayed 307 307 LearnWord(String word) 308 308 IgnoreWord(String word) … … 337 337 338 338 # Keyboard input support messages 339 ExecuteSavedCommandBySelector(String selector) -> (bool handled) LegacySync339 ExecuteSavedCommandBySelector(String selector) -> (bool handled) Delayed 340 340 341 341 # Remote accessibility messages … … 347 347 348 348 # Speech messages 349 GetIsSpeaking() -> (bool isSpeaking) LegacySync349 GetIsSpeaking() -> (bool isSpeaking) Delayed 350 350 Speak(String string) 351 351 StopSpeaking() … … 365 365 366 366 #if USE(APPKIT) 367 SubstitutionsPanelIsShowing() -> (bool isShowing) LegacySync367 SubstitutionsPanelIsShowing() -> (bool isShowing) Delayed 368 368 #endif 369 369 #if USE(AUTOMATIC_TEXT_REPLACEMENT) … … 378 378 ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> alternativeReplacementStrings) 379 379 DismissCorrectionPanel(int32_t reason) 380 DismissCorrectionPanelSoon(int32_t reason) -> (String result) LegacySync380 DismissCorrectionPanelSoon(int32_t reason) -> (String result) Delayed 381 381 RecordAutocorrectionResponse(int32_t response, String replacedString, String replacementString); 382 382 … … 387 387 ShowDictationAlternativeUI(WebCore::FloatRect boundingBoxOfDictatedText, uint64_t dictationContext) 388 388 RemoveDictationAlternatives(uint64_t dictationContext) 389 DictationAlternatives(uint64_t dictationContext) -> (Vector<String> alternatives) LegacySync389 DictationAlternatives(uint64_t dictationContext) -> (Vector<String> alternatives) Delayed 390 390 #endif 391 391 392 392 #if PLATFORM(X11) 393 393 # X11 windowed plugin messages 394 CreatePluginContainer() -> (uint64_t windowID) LegacySync394 CreatePluginContainer() -> (uint64_t windowID) Delayed 395 395 WindowedPluginGeometryDidChange(WebCore::IntRect frameRect, WebCore::IntRect clipRect, uint64_t windowID) 396 396 WindowedPluginVisibilityDidChange(bool isVisible, uint64_t windowID) … … 430 430 # Search popup menus 431 431 SaveRecentSearches(String name, Vector<WebCore::RecentSearch> searchItems) 432 LoadRecentSearches(String name) -> (Vector<WebCore::RecentSearch> result) LegacySync432 LoadRecentSearches(String name) -> (Vector<WebCore::RecentSearch> result) Delayed 433 433 434 434 SavePDFToFileInDownloadsFolder(String suggestedFilename, URL originatingURL, IPC::DataReference data) … … 440 440 441 441 #if ENABLE(PDFKIT_PLUGIN) 442 ShowPDFContextMenu(struct WebKit::PDFContextMenu contextMenu) -> (Optional<int32_t> selectedItem) LegacySync442 ShowPDFContextMenu(struct WebKit::PDFContextMenu contextMenu) -> (Optional<int32_t> selectedItem) Delayed 443 443 #endif 444 444 … … 452 452 453 453 #if ENABLE(WEB_CRYPTO) 454 WrapCryptoKey(Vector<uint8_t> key) -> (bool succeeded, Vector<uint8_t> wrappedKey) LegacySync455 UnwrapCryptoKey(Vector<uint8_t> wrappedKey) -> (bool succeeded, Vector<uint8_t> key) LegacySync454 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 456 456 #endif 457 457 … … 486 486 #endif 487 487 HandleMessage(String messageName, WebKit::UserData messageBody) WantsConnection 488 HandleSynchronousMessage(String messageName, WebKit::UserData messageBody) -> (WebKit::UserData returnData) LegacySyncWantsConnection488 HandleSynchronousMessage(String messageName, WebKit::UserData messageBody) -> (WebKit::UserData returnData) Delayed WantsConnection 489 489 490 490 HandleAutoFillButtonClick(WebKit::UserData userData) … … 547 547 DidInsertAttachmentWithIdentifier(String identifier, String source, bool hasEnclosingImage) 548 548 DidRemoveAttachmentWithIdentifier(String identifier) 549 SerializedAttachmentDataForIdentifiers(Vector<String> identifiers) -> (Vector<WebCore::SerializedAttachmentData> seralizedData) LegacySync550 #endif 551 552 SignedPublicKeyAndChallengeString(unsigned keySizeIndex, String challengeString, URL url) -> (String result) LegacySync549 SerializedAttachmentDataForIdentifiers(Vector<String> identifiers) -> (Vector<WebCore::SerializedAttachmentData> seralizedData) Delayed 550 #endif 551 552 SignedPublicKeyAndChallengeString(unsigned keySizeIndex, String challengeString, URL url) -> (String result) Delayed 553 553 554 554 #if ENABLE(SPEECH_SYNTHESIS) 555 SpeechSynthesisVoiceList() -> (Vector<WebKit::WebSpeechSynthesisVoice> voiceList) LegacySync555 SpeechSynthesisVoiceList() -> (Vector<WebKit::WebSpeechSynthesisVoice> voiceList) Delayed 556 556 SpeechSynthesisSpeak(String text, String lang, float volume, float rate, float pitch, MonotonicTime startTime, String voiceURI, String voiceName, String voiceLang, bool localService, bool defaultVoice) -> () Async 557 557 SpeechSynthesisCancel() -
trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp
r240712 r243327 66 66 } 67 67 68 void WebPageProxy::loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&)68 void WebPageProxy::loadRecentSearches(const String&, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler) 69 69 { 70 70 notImplemented(); 71 completionHandler({ }); 71 72 } 72 73 … … 103 104 } 104 105 105 void WebPageProxy::createPluginContainer( uint64_t& windowID)106 void WebPageProxy::createPluginContainer(CompletionHandler<void(uint64_t)>&& completionHandler) 106 107 { 107 108 RELEASE_ASSERT(WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11); … … 110 111 gtk_container_add(GTK_CONTAINER(viewWidget()), socket); 111 112 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))); 113 114 pluginWindowMap().set(windowID, socket); 115 completionHandler(windowID); 114 116 } 115 117 -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r243102 r243327 79 79 } 80 80 81 void WebPageProxy::getIsSpeaking(bool&) 82 { 83 notImplemented(); 81 void WebPageProxy::getIsSpeaking(CompletionHandler<void(bool)>&& completionHandler) 82 { 83 notImplemented(); 84 completionHandler(false); 84 85 } 85 86 … … 742 743 } 743 744 744 void WebPageProxy::interpretKeyEvent(const EditorState& state, bool isCharEvent, bool& handled)745 void WebPageProxy::interpretKeyEvent(const EditorState& state, bool isCharEvent, CompletionHandler<void(bool)>&& completionHandler) 745 746 { 746 747 m_editorState = state; 747 handled = pageClient().interpretKeyEvent(m_keyEventQueue.first(), isCharEvent);748 completionHandler(pageClient().interpretKeyEvent(m_keyEventQueue.first(), isCharEvent)); 748 749 } 749 750 … … 792 793 } 793 794 794 void WebPageProxy::executeSavedCommandBySelector(const String&, bool&) 795 { 796 notImplemented(); 795 void WebPageProxy::executeSavedCommandBySelector(const String&, CompletionHandler<void(bool)>&& completionHandler) 796 { 797 notImplemented(); 798 completionHandler(false); 797 799 } 798 800 -
trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
r243094 r243327 132 132 } 133 133 134 void WebPageProxy::getIsSpeaking( bool& isSpeaking)134 void WebPageProxy::getIsSpeaking(CompletionHandler<void(bool)>&& completionHandler) 135 135 { 136 136 ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); 137 isSpeaking = [NSApp isSpeaking];137 completionHandler([NSApp isSpeaking]); 138 138 } 139 139 … … 405 405 } 406 406 407 void WebPageProxy::executeSavedCommandBySelector(const String& selector, bool& handled)407 void WebPageProxy::executeSavedCommandBySelector(const String& selector, CompletionHandler<void(bool)>&& completionHandler) 408 408 { 409 409 MESSAGE_CHECK(isValidKeypressCommandName(selector)); 410 410 411 handled = pageClient().executeSavedCommandBySelector(selector);411 completionHandler(pageClient().executeSavedCommandBySelector(selector)); 412 412 } 413 413 … … 549 549 550 550 #if ENABLE(PDFKIT_PLUGIN) 551 void WebPageProxy::showPDFContextMenu(const WebKit::PDFContextMenu& contextMenu, Optional<int32_t>& selectedIndex)551 void WebPageProxy::showPDFContextMenu(const WebKit::PDFContextMenu& contextMenu, CompletionHandler<void(Optional<int32_t>&&)>&& completionHandler) 552 552 { 553 553 if (!contextMenu.m_items.size()) 554 return ;554 return completionHandler(WTF::nullopt); 555 555 556 556 RetainPtr<WKPDFMenuTarget> menuTarget = adoptNS([[WKPDFMenuTarget alloc] init]); … … 585 585 586 586 if (auto selectedMenuItem = [menuTarget selectedMenuItem]) 587 selectedIndex = [selectedMenuItem tag]; 587 return completionHandler([selectedMenuItem tag]); 588 completionHandler(WTF::nullopt); 588 589 } 589 590 #endif -
trunk/Source/WebKit/UIProcess/win/WebPageProxyWin.cpp
r237308 r243327 51 51 } 52 52 53 void WebPageProxy::loadRecentSearches(const String& name, Vector<WebCore::RecentSearch>& searchItems)53 void WebPageProxy::loadRecentSearches(const String& name, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler) 54 54 { 55 55 if (!name) 56 return ;56 return completionHandler({ }); 57 57 58 return WebCore::SearchPopupMenuDB::singleton().loadRecentSearches(name, searchItems); 58 Vector<WebCore::RecentSearch> searchItems; 59 WebCore::SearchPopupMenuDB::singleton().loadRecentSearches(name, searchItems); 60 completionHandler(WTFMove(searchItems)); 59 61 } 60 62 -
trunk/Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp
r235903 r243327 54 54 } 55 55 56 void WebPageProxy::loadRecentSearches(const String&, Vector<WebCore::RecentSearch>&)56 void WebPageProxy::loadRecentSearches(const String&, CompletionHandler<void(Vector<WebCore::RecentSearch>&&)>&& completionHandler) 57 57 { 58 58 notImplemented(); 59 completionHandler({ }); 59 60 } 60 61
Note:
See TracChangeset
for help on using the changeset viewer.