aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2015-08-10 12:35:31 -0400
committerJosh Matthews <josh@joshmatthews.net>2015-08-12 00:59:28 -0400
commit47b9e89c6613b95ea4fe60c306390e89ce2c592c (patch)
tree24e48e3b4e9241aff2a38613a72b63956ec03be5 /components
parent9c528c6382ee4355f42824a7caad217c4eb8a3b0 (diff)
downloadservo-47b9e89c6613b95ea4fe60c306390e89ce2c592c.tar.gz
servo-47b9e89c6613b95ea4fe60c306390e89ce2c592c.zip
Document the use and meaning of the devtools control messages. Fixes #6922.
Diffstat (limited to 'components')
-rw-r--r--components/devtools_traits/lib.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs
index 65bbd238dd1..71468aaf1e3 100644
--- a/components/devtools_traits/lib.rs
+++ b/components/devtools_traits/lib.rs
@@ -46,25 +46,38 @@ pub struct DevtoolsPageInfo {
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.
pub enum DevtoolsControlMsg {
+ /// Messages from tasks in the chrome process (resource/constellation/devtools)
FromChrome(ChromeToDevtoolsControlMsg),
+ /// Messages from script tasks
FromScript(ScriptToDevtoolsControlMsg),
}
+/// Events that the devtools server must act upon.
pub enum ChromeToDevtoolsControlMsg {
+ /// A new client has connected to the server.
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),
+ /// The browser is shutting down.
ServerExitMsg,
+ /// A network event occurred (request, reply, etc.). The actor with the
+ /// provided name should be notified.
NetworkEvent(String, NetworkEvent),
}
#[derive(Deserialize, Serialize)]
+/// Events that the devtools server must act upon.
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>),
IpcSender<DevtoolScriptControlMsg>,
DevtoolsPageInfo),
+ /// A particular page has invoked the console API.
ConsoleAPI(PipelineId, ConsoleMessage, Option<WorkerId>),
}