mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Document the use and meaning of the devtools control messages. Fixes #6922.
This commit is contained in:
parent
9c528c6382
commit
47b9e89c66
1 changed files with 14 additions and 1 deletions
|
@ -46,25 +46,38 @@ pub struct DevtoolsPageInfo {
|
||||||
pub url: Url
|
pub url: Url
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Messages to the instruct the devtools server to update its known actors/state
|
/// Messages to instruct the devtools server to update its known actors/state
|
||||||
/// according to changes in the browser.
|
/// according to changes in the browser.
|
||||||
pub enum DevtoolsControlMsg {
|
pub enum DevtoolsControlMsg {
|
||||||
|
/// Messages from tasks in the chrome process (resource/constellation/devtools)
|
||||||
FromChrome(ChromeToDevtoolsControlMsg),
|
FromChrome(ChromeToDevtoolsControlMsg),
|
||||||
|
/// Messages from script tasks
|
||||||
FromScript(ScriptToDevtoolsControlMsg),
|
FromScript(ScriptToDevtoolsControlMsg),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Events that the devtools server must act upon.
|
||||||
pub enum ChromeToDevtoolsControlMsg {
|
pub enum ChromeToDevtoolsControlMsg {
|
||||||
|
/// A new client has connected to the server.
|
||||||
AddClient(TcpStream),
|
AddClient(TcpStream),
|
||||||
|
/// An animation frame with the given timestamp was processed in a script task.
|
||||||
|
/// The actor with the provided name should be notified.
|
||||||
FramerateTick(String, f64),
|
FramerateTick(String, f64),
|
||||||
|
/// The browser is shutting down.
|
||||||
ServerExitMsg,
|
ServerExitMsg,
|
||||||
|
/// A network event occurred (request, reply, etc.). The actor with the
|
||||||
|
/// provided name should be notified.
|
||||||
NetworkEvent(String, NetworkEvent),
|
NetworkEvent(String, NetworkEvent),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Serialize)]
|
#[derive(Deserialize, Serialize)]
|
||||||
|
/// Events that the devtools server must act upon.
|
||||||
pub enum ScriptToDevtoolsControlMsg {
|
pub enum ScriptToDevtoolsControlMsg {
|
||||||
|
/// A new global object was created, associated with a particular pipeline.
|
||||||
|
/// The means of communicating directly with it are provided.
|
||||||
NewGlobal((PipelineId, Option<WorkerId>),
|
NewGlobal((PipelineId, Option<WorkerId>),
|
||||||
IpcSender<DevtoolScriptControlMsg>,
|
IpcSender<DevtoolScriptControlMsg>,
|
||||||
DevtoolsPageInfo),
|
DevtoolsPageInfo),
|
||||||
|
/// A particular page has invoked the console API.
|
||||||
ConsoleAPI(PipelineId, ConsoleMessage, Option<WorkerId>),
|
ConsoleAPI(PipelineId, ConsoleMessage, Option<WorkerId>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue