diff options
author | webbeef <me@webbeef.org> | 2024-08-21 21:11:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-22 04:11:16 +0000 |
commit | 663a92a5df39f5daef091624b6e29c228dcecbc3 (patch) | |
tree | dbcf67d033768d91ed585623c816410f0267d34d /components/compositing | |
parent | 562d32c0519d58052cea681a696546fd4818bd3a (diff) | |
download | servo-663a92a5df39f5daef091624b6e29c228dcecbc3.tar.gz servo-663a92a5df39f5daef091624b6e29c228dcecbc3.zip |
make protocol handlers registrable (#33104)
Signed-off-by: webbeef <me@webbeef.org>
Diffstat (limited to 'components/compositing')
-rw-r--r-- | components/compositing/Cargo.toml | 1 | ||||
-rw-r--r-- | components/compositing/windowing.rs | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 98b954d9dbb..21bd1a0cced 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -31,6 +31,7 @@ ipc-channel = { workspace = true } keyboard-types = { workspace = true } libc = { workspace = true } log = { workspace = true } +net = { path = "../net" } net_traits = { workspace = true } pixels = { path = "../pixels" } profile_traits = { workspace = true } diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index 8e9b89ccadd..b65c5fe88eb 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -12,6 +12,7 @@ use embedder_traits::{EmbedderProxy, EventLoopWaker}; use euclid::Scale; use keyboard_types::KeyboardEvent; use libc::c_void; +use net::protocols::ProtocolRegistry; use script_traits::{ GamepadEvent, MediaSessionActionType, MouseButton, TouchEventType, TouchId, TraversalDirection, WheelDelta, @@ -222,6 +223,12 @@ pub trait EmbedderMethods { fn get_user_agent_string(&self) -> Option<String> { None } + + /// Returns the protocol handlers implemented by that embedder. + /// They will be merged with the default internal ones. + fn get_protocol_handlers(&self) -> ProtocolRegistry { + ProtocolRegistry::default() + } } #[derive(Clone, Copy, Debug)] |