mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
compositing: Make the constellation messages serializable.
This commit is contained in:
parent
a0cf597946
commit
b6485a9eaf
32 changed files with 316 additions and 229 deletions
|
@ -5,6 +5,7 @@
|
|||
use msg::constellation_msg::ConstellationChan;
|
||||
use msg::constellation_msg::Msg as ConstellationMsg;
|
||||
|
||||
use ipc_channel::ipc;
|
||||
use std::borrow::ToOwned;
|
||||
use std::sync::mpsc::channel;
|
||||
|
||||
|
@ -17,7 +18,7 @@ pub trait ClipboardProvider {
|
|||
|
||||
impl ClipboardProvider for ConstellationChan {
|
||||
fn clipboard_contents(&mut self) -> String {
|
||||
let (tx, rx) = channel();
|
||||
let (tx, rx) = ipc::channel().unwrap();
|
||||
self.0.send(ConstellationMsg::GetClipboardContents(tx)).unwrap();
|
||||
rx.recv().unwrap()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue