Basic webdriver support to servoshell on ohos (#38386)

Adding basic webdriver support to servoshell on ohos and basic
communication between the ohos device and script.

Testing: Manual testing and tracing logs

Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
This commit is contained in:
Abdelrahman Hossam 2025-08-12 14:26:53 +08:00 committed by GitHub
parent f5b631e270
commit 2e2bfc6067
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 113 additions and 17 deletions

View file

@ -9,6 +9,7 @@ use std::path::PathBuf;
use std::rc::Rc;
use crossbeam_channel::Receiver;
use embedder_traits::webdriver::WebDriverSenders;
use euclid::Vector2D;
use keyboard_types::{Key, Modifiers, NamedKey, ShortcutMatcher};
use log::{error, info};
@ -40,16 +41,6 @@ pub(crate) enum AppState {
ShuttingDown,
}
/// A collection of [`IpcSender`]s that are used to asynchronously communicate
/// to a WebDriver server with information about application state.
#[derive(Clone, Default)]
struct WebDriverSenders {
pub load_status_senders: HashMap<WebViewId, IpcSender<WebDriverLoadStatus>>,
pub script_evaluation_interrupt_sender: Option<IpcSender<WebDriverJSResult>>,
pub pending_traversals: HashMap<TraversalId, IpcSender<WebDriverLoadStatus>>,
pub pending_focus: HashMap<FocusId, IpcSender<bool>>,
}
pub(crate) struct RunningAppState {
/// A handle to the Servo instance of the [`RunningAppState`]. This is not stored inside
/// `inner` so that we can keep a reference to Servo in order to spin the event loop,