Make it possible to close a browsing context from the embedder

This commit is contained in:
Paul Rouget 2017-08-22 06:49:05 +02:00
parent d7b7e7aea8
commit ecdcfa8226
4 changed files with 23 additions and 1 deletions

View file

@ -811,6 +811,13 @@ impl<Window: WindowMethods> IOCompositor<Window> {
}
}
WindowEvent::CloseBrowser(ctx) => {
let msg = ConstellationMsg::CloseBrowser(ctx);
if let Err(e) = self.constellation_chan.send(msg) {
warn!("Sending CloseBrowser message to constellation failed ({}).", e);
}
}
WindowEvent::SelectBrowser(ctx) => {
let msg = ConstellationMsg::SelectBrowser(ctx);
if let Err(e) = self.constellation_chan.send(msg) {