From eeb75692f4ecfce66a6dece6e314b5e8180b09d3 Mon Sep 17 00:00:00 2001 From: Mirko Brodesser Date: Thu, 16 Jun 2022 14:43:41 +0000 Subject: [PATCH] Bug 1744524: part 4) Propagate from the JS side to the C++ side whether the user clicked or dismissed the "Paste" button. r=edgar Differential Revision: https://phabricator.services.mozilla.com/D136617 --- toolkit/actors/ClipboardReadTextPasteChild.jsm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/toolkit/actors/ClipboardReadTextPasteChild.jsm b/toolkit/actors/ClipboardReadTextPasteChild.jsm index ceb8ee8b2b58..2e69b7197eb9 100644 --- a/toolkit/actors/ClipboardReadTextPasteChild.jsm +++ b/toolkit/actors/ClipboardReadTextPasteChild.jsm @@ -26,11 +26,15 @@ class ClipboardReadTextPasteChild extends JSWindowActorChild { receiveMessage(value) { switch (value.name) { case "ClipboardReadTextPaste:PasteMenuItemClicked": { - // TODO: notify C++ side. + this.contentWindow.navigator.clipboard.onUserReactedToPasteMenuPopup( + true + ); break; } case "ClipboardReadTextPaste:PasteMenuItemDismissed": { - // TODO: notify C++ side. + this.contentWindow.navigator.clipboard.onUserReactedToPasteMenuPopup( + false + ); break; } }