mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
OHOS: Use native API to get most of the information needed for starting servoshell. (#37392)
Uses the native ohos-api crates to get the required information for starting servoshell. This increases the minimum API version requirement to API-14. Testing: Tested on device. --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
This commit is contained in:
parent
7a801f0ef5
commit
099fd10317
6 changed files with 95 additions and 47 deletions
|
@ -45,12 +45,8 @@ mod simpleservo;
|
|||
#[derive(Debug)]
|
||||
pub struct InitOpts {
|
||||
pub url: String,
|
||||
pub device_type: String,
|
||||
pub os_full_name: String,
|
||||
/// Path to application data bundled with the servo app, e.g. web-pages.
|
||||
pub resource_dir: String,
|
||||
pub cache_dir: String,
|
||||
pub display_density: f64,
|
||||
pub commandline_args: String,
|
||||
}
|
||||
|
||||
|
@ -626,10 +622,6 @@ pub fn register_prompt_toast_callback(callback: Function<String, ()>) -> napi_oh
|
|||
#[napi]
|
||||
pub fn init_servo(init_opts: InitOpts) -> napi_ohos::Result<()> {
|
||||
info!("Servo is being initialised with the following Options: ");
|
||||
info!(
|
||||
"Device Type: {}, DisplayDensity: {}",
|
||||
init_opts.device_type, init_opts.display_density
|
||||
);
|
||||
info!("Initial URL: {}", init_opts.url);
|
||||
let channel = if let Some(channel) = SERVO_CHANNEL.get() {
|
||||
channel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue