diff options
author | Sagar Muchhal <muchhalsagar88@gmail.com> | 2015-02-05 19:52:35 +0000 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2015-02-05 21:44:07 +0000 |
commit | 6699738cae3a82ae2114897ff5dc0dfdf7c59743 (patch) | |
tree | 98df788b8adb6d0fb32b46ac0751aba75afffc33 /components/script/page.rs | |
parent | 149053c2a770f919538133350f9398510c998bcf (diff) | |
download | servo-6699738cae3a82ae2114897ff5dc0dfdf7c59743.tar.gz servo-6699738cae3a82ae2114897ff5dc0dfdf7c59743.zip |
Add console message support to devtools. Does not actually cause logging to occur in the remote console.
Diffstat (limited to 'components/script/page.rs')
-rw-r--r-- | components/script/page.rs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/components/script/page.rs b/components/script/page.rs index a7a24608b4e..61de79ff038 100644 --- a/components/script/page.rs +++ b/components/script/page.rs @@ -11,6 +11,7 @@ use dom::document::{Document, DocumentHelpers}; use dom::element::Element; use dom::node::{Node, NodeHelpers}; use dom::window::Window; +use devtools_traits::DevtoolsControlChan; use layout_interface::{ ContentBoxResponse, ContentBoxesResponse, HitTestResponse, LayoutChan, LayoutRPC, MouseOverResponse, Msg, Reflow, @@ -100,6 +101,9 @@ pub struct Page { /// A flag to indicate whether the developer tools have requested live updates of /// page changes. pub devtools_wants_updates: Cell<bool>, + + /// For providing instructions to an optional devtools server. + pub devtools_chan: Option<DevtoolsControlChan>, } pub struct PageIterator { @@ -130,12 +134,13 @@ impl IterablePage for Rc<Page> { impl Page { pub fn new(id: PipelineId, subpage_id: Option<SubpageId>, - layout_chan: LayoutChan, - window_size: WindowSizeData, - resource_task: ResourceTask, - storage_task: StorageTask, - constellation_chan: ConstellationChan, - js_context: Rc<Cx>) -> Page { + layout_chan: LayoutChan, + window_size: WindowSizeData, + resource_task: ResourceTask, + storage_task: StorageTask, + constellation_chan: ConstellationChan, + js_context: Rc<Cx>, + devtools_chan: Option<DevtoolsControlChan>) -> Page { let js_info = JSPageInfo { dom_static: GlobalStaticData::new(), js_context: js_context, @@ -166,6 +171,7 @@ impl Page { children: DOMRefCell::new(vec!()), page_clip_rect: Cell::new(MAX_RECT), devtools_wants_updates: Cell::new(false), + devtools_chan: devtools_chan, } } |