mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
make protocol handlers registrable (#33104)
Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
562d32c051
commit
663a92a5df
19 changed files with 516 additions and 219 deletions
|
@ -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 }
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue