mirror of
https://github.com/servo/servo.git
synced 2025-09-09 14:38:21 +01:00
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:
parent
f5b631e270
commit
2e2bfc6067
9 changed files with 113 additions and 17 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue