1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 * Propagates "MozClipboardReadPaste" events from a content process to the
8 * Receives messages from the chrome process.
10 export class ClipboardReadPasteChild extends JSWindowActorChild {
15 // EventListener interface.
17 if (aEvent.type == "MozClipboardReadPaste" && aEvent.isTrusted) {
18 this.sendAsyncMessage("ClipboardReadPaste:ShowMenupopup", {});
22 // For JSWindowActorChild.
23 receiveMessage(value) {
25 case "ClipboardReadPaste:PasteMenuItemClicked": {
26 this.contentWindow.navigator.clipboard.onUserReactedToPasteMenuPopup(
31 case "ClipboardReadPaste:PasteMenuItemDismissed": {
32 this.contentWindow.navigator.clipboard.onUserReactedToPasteMenuPopup(