diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2017-02-14 16:06:28 -0600 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2017-03-15 14:57:25 -0500 |
commit | f9c5d0c1175fe52ceed8f81ba4999cdad7002b56 (patch) | |
tree | b49a74f418a95d2c35469bb30e19d9acc7d03d84 /components/script_traits/lib.rs | |
parent | f5c67fda04195bd6d8ef10a73b9158eb60dbd6d7 (diff) | |
download | servo-f9c5d0c1175fe52ceed8f81ba4999cdad7002b56.tar.gz servo-f9c5d0c1175fe52ceed8f81ba4999cdad7002b56.zip |
Implement dissimilar-origin postMessage.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r-- | components/script_traits/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index a1d97b8b232..96042083d39 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -63,6 +63,7 @@ use net_traits::storage_thread::StorageType; use profile_traits::mem; use profile_traits::time as profile_time; use serde::{Deserialize, Deserializer, Serialize, Serializer}; +use servo_url::ImmutableOrigin; use servo_url::ServoUrl; use std::collections::HashMap; use std::fmt; @@ -239,6 +240,8 @@ pub enum ConstellationControlMsg { /// Notifies script thread that a url should be loaded in this iframe. /// PipelineId is for the parent, FrameId is for the actual frame. Navigate(PipelineId, FrameId, LoadData, bool), + /// Post a message to a given window. + PostMessage(PipelineId, Option<ImmutableOrigin>, Vec<u8>), /// Requests the script thread forward a mozbrowser event to an iframe it owns, /// or to the window if no child frame id is provided. MozBrowserEvent(PipelineId, Option<FrameId>, MozBrowserEvent), @@ -297,6 +300,7 @@ impl fmt::Debug for ConstellationControlMsg { ChangeFrameVisibilityStatus(..) => "ChangeFrameVisibilityStatus", NotifyVisibilityChange(..) => "NotifyVisibilityChange", Navigate(..) => "Navigate", + PostMessage(..) => "PostMessage", MozBrowserEvent(..) => "MozBrowserEvent", UpdatePipelineId(..) => "UpdatePipelineId", FocusIFrame(..) => "FocusIFrame", |