diff options
author | gatowololo <gatowololo@gmail.com> | 2019-06-26 14:44:44 -0700 |
---|---|---|
committer | Iulian Gabriel Radu <iulian.radu67@gmail.com> | 2020-02-27 01:01:08 +0200 |
commit | 675b36dde561810af94879e5263e656b784a2364 (patch) | |
tree | 6d29dbf39d2b767e597953ef70a64f318f08d472 /components/script/dom/globalscope.rs | |
parent | 24c14ac94ea53e93ce700ebe1c463fb8f049b54c (diff) | |
download | servo-675b36dde561810af94879e5263e656b784a2364.tar.gz servo-675b36dde561810af94879e5263e656b784a2364.zip |
Move tinyfiledialog out of script into embedder.
Diffstat (limited to 'components/script/dom/globalscope.rs')
-rw-r--r-- | components/script/dom/globalscope.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs index e631c9bfc9c..f46a07bbcb2 100644 --- a/components/script/dom/globalscope.rs +++ b/components/script/dom/globalscope.rs @@ -61,6 +61,7 @@ use crate::timers::{OneshotTimers, TimerCallback}; use content_security_policy::CspList; use devtools_traits::{PageError, ScriptToDevtoolsControlMsg}; use dom_struct::dom_struct; +use embedder_traits::EmbedderMsg; use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::router::ROUTER; use js::glue::{IsWrapper, UnwrapObjectDynamic}; @@ -1917,6 +1918,14 @@ impl GlobalScope { &self.script_to_constellation_chan } + pub fn send_to_embedder(&self, msg: EmbedderMsg) { + self.send_to_constellation(ScriptMsg::ForwardToEmbedder(msg)); + } + + pub fn send_to_constellation(&self, msg: ScriptMsg) { + self.script_to_constellation_chan().send(msg).unwrap(); + } + pub fn scheduler_chan(&self) -> &IpcSender<TimerSchedulerMsg> { &self.scheduler_chan } |