diff options
author | Mukilan Thiyagarajan <mukilan@igalia.com> | 2025-02-06 19:51:29 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-06 14:21:29 +0000 |
commit | e0689c1f0b2c032c5259ee0446469f4935e6518e (patch) | |
tree | a00ceae8d5e6aa771b5b21516e25611d8ac6b9fa /ports/servoshell/egl/ohos/simpleservo.rs | |
parent | e7a6691628fa1c53baf714d844be19aa99c4bfec (diff) | |
download | servo-e0689c1f0b2c032c5259ee0446469f4935e6518e.tar.gz servo-e0689c1f0b2c032c5259ee0446469f4935e6518e.zip |
Migrate Android and OHOS ports to the delegate API (#35315)
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'ports/servoshell/egl/ohos/simpleservo.rs')
-rw-r--r-- | ports/servoshell/egl/ohos/simpleservo.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ports/servoshell/egl/ohos/simpleservo.rs b/ports/servoshell/egl/ohos/simpleservo.rs index 3869e7cfdde..847664ece0d 100644 --- a/ports/servoshell/egl/ohos/simpleservo.rs +++ b/ports/servoshell/egl/ohos/simpleservo.rs @@ -18,12 +18,12 @@ use servo::{self, resources, Servo}; use surfman::{Connection, SurfaceType}; use xcomponent_sys::OH_NativeXComponent; +use crate::egl::app_state::{ + Coordinates, RunningAppState, ServoEmbedderCallbacks, ServoWindowCallbacks, +}; use crate::egl::host_trait::HostTrait; use crate::egl::ohos::resources::ResourceReaderInstance; use crate::egl::ohos::InitOpts; -use crate::egl::servo_glue::{ - Coordinates, ServoEmbedderCallbacks, ServoGlue, ServoWindowCallbacks, -}; use crate::prefs::{parse_command_line_arguments, ArgumentParsingResult}; /// Initialize Servo. At that point, we need a valid GL context. @@ -34,7 +34,7 @@ pub fn init( xcomponent: *mut OH_NativeXComponent, waker: Box<dyn EventLoopWaker>, callbacks: Box<dyn HostTrait>, -) -> Result<ServoGlue, &'static str> { +) -> Result<Rc<RunningAppState>, &'static str> { info!("Entered simpleservo init function"); crate::init_tracing(); crate::init_crypto(); @@ -117,7 +117,7 @@ pub fn init( CompositeTarget::ContextFbo, ); - let servo_glue = ServoGlue::new( + let app_state = RunningAppState::new( Some(options.url), rendering_context, servo, @@ -125,5 +125,5 @@ pub fn init( servoshell_preferences, ); - Ok(servo_glue) + Ok(app_state) } |