mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
devtools: Use webview_id
as browser_id
(#35956)
* use `webview_id` as `browser_id` Signed-off-by: atbrakhi <atbrakhi@igalia.com> * use correct webview id Signed-off-by: atbrakhi <atbrakhi@igalia.com> * fmt Signed-off-by: atbrakhi <atbrakhi@igalia.com> * review fix Signed-off-by: atbrakhi <atbrakhi@igalia.com> --------- Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
4acaa08cf5
commit
2362e4c134
7 changed files with 43 additions and 17 deletions
|
@ -10,7 +10,7 @@ use std::cell::{Cell, RefCell};
|
|||
use std::collections::HashMap;
|
||||
use std::net::TcpStream;
|
||||
|
||||
use base::id::{BrowsingContextId, PipelineId};
|
||||
use base::id::{BrowsingContextId, PipelineId, WebViewId};
|
||||
use devtools_traits::DevtoolScriptControlMsg::{self, GetCssDatabase, WantsLiveNotifications};
|
||||
use devtools_traits::{DevtoolsPageInfo, NavigationState};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
|
@ -84,6 +84,9 @@ pub struct BrowsingContextActorMsg {
|
|||
actor: String,
|
||||
title: String,
|
||||
url: String,
|
||||
/// This correspond to webview_id
|
||||
#[serde(rename = "browserId")]
|
||||
browser_id: u32,
|
||||
#[serde(rename = "outerWindowID")]
|
||||
outer_window_id: u32,
|
||||
#[serde(rename = "browsingContextID")]
|
||||
|
@ -121,6 +124,8 @@ pub(crate) struct BrowsingContextActor {
|
|||
pub name: String,
|
||||
pub title: RefCell<String>,
|
||||
pub url: RefCell<String>,
|
||||
/// This correspond to webview_id
|
||||
pub browser_id: WebViewId,
|
||||
pub active_pipeline: Cell<PipelineId>,
|
||||
pub browsing_context_id: BrowsingContextId,
|
||||
pub accessibility: String,
|
||||
|
@ -173,6 +178,7 @@ impl Actor for BrowsingContextActor {
|
|||
impl BrowsingContextActor {
|
||||
pub(crate) fn new(
|
||||
console: String,
|
||||
browser_id: WebViewId,
|
||||
browsing_context_id: BrowsingContextId,
|
||||
page_info: DevtoolsPageInfo,
|
||||
pipeline_id: PipelineId,
|
||||
|
@ -225,6 +231,7 @@ impl BrowsingContextActor {
|
|||
title: RefCell::new(title),
|
||||
url: RefCell::new(url.into_string()),
|
||||
active_pipeline: Cell::new(pipeline_id),
|
||||
browser_id,
|
||||
browsing_context_id,
|
||||
accessibility: accessibility.name(),
|
||||
console,
|
||||
|
@ -263,6 +270,7 @@ impl BrowsingContextActor {
|
|||
},
|
||||
title: self.title.borrow().clone(),
|
||||
url: self.url.borrow().clone(),
|
||||
browser_id: self.browser_id.0.index.0.get(),
|
||||
//FIXME: shouldn't ignore pipeline namespace field
|
||||
browsing_context_id: self.browsing_context_id.index.0.get(),
|
||||
//FIXME: shouldn't ignore pipeline namespace field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue