mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Return real page titles and URLs for devtools tab choices.
Fixes #4167.
This commit is contained in:
parent
914f27263d
commit
a477893ab3
3 changed files with 37 additions and 15 deletions
|
@ -12,6 +12,8 @@
|
|||
|
||||
extern crate "msg" as servo_msg;
|
||||
extern crate serialize;
|
||||
extern crate url;
|
||||
extern crate "util" as servo_util;
|
||||
|
||||
/// This module contains shared types and messages for use by devtools/script.
|
||||
/// The traits are here instead of in script so that the devtools crate can be
|
||||
|
@ -19,14 +21,23 @@ extern crate serialize;
|
|||
|
||||
use serialize::{Decodable, Decoder};
|
||||
use servo_msg::constellation_msg::PipelineId;
|
||||
use servo_util::str::DOMString;
|
||||
use url::Url;
|
||||
|
||||
pub type DevtoolsControlChan = Sender<DevtoolsControlMsg>;
|
||||
pub type DevtoolsControlPort = Receiver<DevtoolScriptControlMsg>;
|
||||
|
||||
// Information would be attached to NewGlobal to be received and show in devtools.
|
||||
// Extend these fields if we need more information.
|
||||
pub struct DevtoolsPageInfo {
|
||||
pub title: DOMString,
|
||||
pub url: Url
|
||||
}
|
||||
|
||||
/// Messages to the instruct the devtools server to update its known actors/state
|
||||
/// according to changes in the browser.
|
||||
pub enum DevtoolsControlMsg {
|
||||
NewGlobal(PipelineId, Sender<DevtoolScriptControlMsg>),
|
||||
NewGlobal(PipelineId, Sender<DevtoolScriptControlMsg>, DevtoolsPageInfo),
|
||||
ServerExitMsg
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue