mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
DevTools - add ListWorkers method to BrowsingContextTargetActor
This commit is contained in:
parent
cdd7f0a658
commit
a424ba9b2d
1 changed files with 23 additions and 0 deletions
|
@ -54,6 +54,20 @@ struct FrameMsg {
|
|||
parentID: u32,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct ListWorkersReply {
|
||||
from: String,
|
||||
workers: Vec<WorkerMsg>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct WorkerMsg {
|
||||
id: u32,
|
||||
url: String,
|
||||
title: String,
|
||||
parentID: u32,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct BrowsingContextActorMsg {
|
||||
actor: String,
|
||||
|
@ -157,6 +171,15 @@ impl Actor for BrowsingContextActor {
|
|||
ActorMessageStatus::Processed
|
||||
},
|
||||
|
||||
"listWorkers" => {
|
||||
let msg = ListWorkersReply {
|
||||
from: self.name(),
|
||||
workers: vec![],
|
||||
};
|
||||
stream.write_json_packet(&msg);
|
||||
ActorMessageStatus::Processed
|
||||
},
|
||||
|
||||
_ => ActorMessageStatus::Ignored,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue