From 1e5103e675db0a7e7bb844473e24b0053e19dbef Mon Sep 17 00:00:00 2001 From: Michal Mieczkowski Date: Thu, 13 Jun 2019 20:16:04 +0200 Subject: [PATCH] Add Embbedder messages for setting/getting clipboard contents --- components/embedder_traits/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/embedder_traits/lib.rs b/components/embedder_traits/lib.rs index 29431ebbb63..b0364ddd23e 100644 --- a/components/embedder_traits/lib.rs +++ b/components/embedder_traits/lib.rs @@ -132,6 +132,10 @@ pub enum EmbedderMsg { AllowUnload(IpcSender), /// Sends an unconsumed key event back to the embedder. Keyboard(KeyboardEvent), + /// Gets system clipboard contents + GetClipboardContents(IpcSender), + /// Sets system clipboard contents + SetClipboardContents(String), /// Changes the cursor. SetCursor(Cursor), /// A favicon was detected @@ -175,6 +179,8 @@ impl Debug for EmbedderMsg { EmbedderMsg::AllowUnload(..) => write!(f, "AllowUnload"), EmbedderMsg::AllowNavigationRequest(..) => write!(f, "AllowNavigationRequest"), EmbedderMsg::Keyboard(..) => write!(f, "Keyboard"), + EmbedderMsg::GetClipboardContents(..) => write!(f, "GetClipboardContents"), + EmbedderMsg::SetClipboardContents(..) => write!(f, "SetClipboardContents"), EmbedderMsg::SetCursor(..) => write!(f, "SetCursor"), EmbedderMsg::NewFavicon(..) => write!(f, "NewFavicon"), EmbedderMsg::HeadParsed => write!(f, "HeadParsed"),