From 483bf245dff23a4bfcb5f698549236aec534ca41 Mon Sep 17 00:00:00 2001 From: Gregory Terzian Date: Tue, 6 Nov 2018 18:43:21 +0800 Subject: constellation: restructure navigation, remove sync comm --- components/compositing/windowing.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'components/compositing/windowing.rs') diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 7e95ca02161..c2575640975 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -9,7 +9,7 @@ use euclid::TypedScale; #[cfg(feature = "gl")] use gleam::gl; use keyboard_types::KeyboardEvent; -use msg::constellation_msg::{TopLevelBrowsingContextId, TraversalDirection}; +use msg::constellation_msg::{PipelineId, TopLevelBrowsingContextId, TraversalDirection}; use script_traits::{MouseButton, TouchEventType, TouchId}; use servo_geometry::DeviceIndependentPixel; use servo_url::ServoUrl; @@ -49,6 +49,8 @@ pub enum WindowEvent { Refresh, /// Sent when the window is resized. Resize, + /// Sent when a navigation request from script is allowed/refused. + AllowNavigationResponse(PipelineId, bool), /// Sent when a new URL is to be loaded. LoadUrl(TopLevelBrowsingContextId, ServoUrl), /// Sent when a mouse hit test is to be performed. @@ -96,6 +98,7 @@ impl Debug for WindowEvent { WindowEvent::Refresh => write!(f, "Refresh"), WindowEvent::Resize => write!(f, "Resize"), WindowEvent::Keyboard(..) => write!(f, "Keyboard"), + WindowEvent::AllowNavigationResponse(..) => write!(f, "AllowNavigationResponse"), WindowEvent::LoadUrl(..) => write!(f, "LoadUrl"), WindowEvent::MouseWindowEventClass(..) => write!(f, "Mouse"), WindowEvent::MouseWindowMoveEventClass(..) => write!(f, "MouseMove"), -- cgit v1.2.3