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,
|
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)]
|
#[derive(Serialize)]
|
||||||
pub struct BrowsingContextActorMsg {
|
pub struct BrowsingContextActorMsg {
|
||||||
actor: String,
|
actor: String,
|
||||||
|
@ -157,6 +171,15 @@ impl Actor for BrowsingContextActor {
|
||||||
ActorMessageStatus::Processed
|
ActorMessageStatus::Processed
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"listWorkers" => {
|
||||||
|
let msg = ListWorkersReply {
|
||||||
|
from: self.name(),
|
||||||
|
workers: vec![],
|
||||||
|
};
|
||||||
|
stream.write_json_packet(&msg);
|
||||||
|
ActorMessageStatus::Processed
|
||||||
|
},
|
||||||
|
|
||||||
_ => ActorMessageStatus::Ignored,
|
_ => ActorMessageStatus::Ignored,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue