mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
feat: webxr
feature flag (#34241)
* Add webxr feature flag Add webxr feature flag to embedder_traits Add webxr flag to constellation Add webxr flag to compositor Add webxr flag to canvas Turn registry into optional Add webxr flag to servo lib Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> Co-authored-by: august kline <me@augustkline.com> * Cargo fmt Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Add missing license Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Cargo clippy Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> Co-authored-by: august kline <me@augustkline.com>
This commit is contained in:
parent
91f96cc9dd
commit
47a243614f
21 changed files with 456 additions and 374 deletions
|
@ -8,7 +8,7 @@ use std::fmt::{Debug, Error, Formatter};
|
|||
use std::time::Duration;
|
||||
|
||||
use base::id::{PipelineId, TopLevelBrowsingContextId};
|
||||
use embedder_traits::{EmbedderProxy, EventLoopWaker};
|
||||
use embedder_traits::EventLoopWaker;
|
||||
use euclid::Scale;
|
||||
use keyboard_types::KeyboardEvent;
|
||||
use libc::c_void;
|
||||
|
@ -219,8 +219,14 @@ pub trait EmbedderMethods {
|
|||
/// Returns a thread-safe object to wake up the window's event loop.
|
||||
fn create_event_loop_waker(&mut self) -> Box<dyn EventLoopWaker>;
|
||||
|
||||
#[cfg(feature = "webxr")]
|
||||
/// Register services with a WebXR Registry.
|
||||
fn register_webxr(&mut self, _: &mut webxr::MainThreadRegistry, _: EmbedderProxy) {}
|
||||
fn register_webxr(
|
||||
&mut self,
|
||||
_: &mut webxr::MainThreadRegistry,
|
||||
_: embedder_traits::EmbedderProxy,
|
||||
) {
|
||||
}
|
||||
|
||||
/// Returns the user agent string to report in network requests.
|
||||
fn get_user_agent_string(&self) -> Option<String> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue