mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
libservo: Move EventLooperWaker
from webxr_traits
to embedder_traits
(#36420)
Now that `webxr` is integrated into the Servo directory, `webxr` can depend on `embedder_traits` instead of having it re-export this type conditionally (and sometimes duplicating it). Testing: This just moves a data type, so no tests are necessary. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
f8db2d2e86
commit
3b41a16fcf
7 changed files with 9 additions and 28 deletions
|
@ -90,21 +90,16 @@ pub enum Cursor {
|
|||
ZoomOut,
|
||||
}
|
||||
|
||||
#[cfg(feature = "webxr")]
|
||||
pub use webxr_api::MainThreadWaker as EventLoopWaker;
|
||||
#[cfg(not(feature = "webxr"))]
|
||||
pub trait EventLoopWaker: 'static + Send {
|
||||
fn clone_box(&self) -> Box<dyn EventLoopWaker>;
|
||||
fn wake(&self);
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "webxr"))]
|
||||
impl Clone for Box<dyn EventLoopWaker> {
|
||||
fn clone(&self) -> Self {
|
||||
EventLoopWaker::clone_box(self.as_ref())
|
||||
self.clone_box()
|
||||
}
|
||||
}
|
||||
|
||||
/// Sends messages to the embedder.
|
||||
pub struct EmbedderProxy {
|
||||
pub sender: Sender<EmbedderMsg>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue