mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
DevTools: Implement watcher actor (#32509)
* feat: base for watcher * feat: some more watcher tests * feat: implement getWatcher * refactor: clean up getWatcher * feat: implement watchTargets * feat: implement watchResources * feat: very messy watchTargets fix * refactor: clean browsing context * feat: target configuration * refactor: start cleanup * refactor: more doc coments * refactor: clean browsing context
This commit is contained in:
parent
26c585a0c5
commit
5eb8813448
9 changed files with 680 additions and 244 deletions
|
@ -5,7 +5,7 @@
|
|||
//! An actor-based remote devtools server implementation. Only tested with
|
||||
//! nightly Firefox versions at time of writing. Largely based on
|
||||
//! reverse-engineering of Firefox chrome devtool logs and reading of
|
||||
//! [code](http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/).
|
||||
//! [code](https://searchfox.org/mozilla-central/source/devtools/server).
|
||||
|
||||
#![crate_name = "devtools"]
|
||||
#![crate_type = "rlib"]
|
||||
|
@ -48,9 +48,10 @@ use crate::actors::worker::{WorkerActor, WorkerType};
|
|||
use crate::protocol::JsonPacketStream;
|
||||
|
||||
mod actor;
|
||||
/// Corresponds to <http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/>
|
||||
/// <https://searchfox.org/mozilla-central/source/devtools/server/actors>
|
||||
mod actors {
|
||||
pub mod browsing_context;
|
||||
pub mod configuration;
|
||||
pub mod console;
|
||||
pub mod device;
|
||||
pub mod emulation;
|
||||
|
@ -68,6 +69,7 @@ mod actors {
|
|||
pub mod tab;
|
||||
pub mod thread;
|
||||
pub mod timeline;
|
||||
pub mod watcher;
|
||||
pub mod worker;
|
||||
}
|
||||
mod protocol;
|
||||
|
@ -113,6 +115,11 @@ struct ResponseStartUpdateMsg {
|
|||
response: ResponseStartMsg,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct EmptyReplyMsg {
|
||||
pub from: String,
|
||||
}
|
||||
|
||||
/// Spin up a devtools server that listens for connections on the specified port.
|
||||
pub fn start_server(port: u16, embedder: EmbedderProxy) -> Sender<DevtoolsControlMsg> {
|
||||
let (sender, receiver) = unbounded();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue