mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move tinyfiledialog out of script into embedder.
This commit is contained in:
parent
24c14ac94e
commit
675b36dde5
6 changed files with 81 additions and 45 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue