mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Implement Navigator
This commit is contained in:
parent
0e351d9f50
commit
e81fed7b58
8 changed files with 496 additions and 1 deletions
|
@ -7,6 +7,7 @@ use dom::bindings::utils::{WrapperCache, DOMString, null_string};
|
|||
use dom::bindings::utils::{CacheableWrapper, BindingObject};
|
||||
use dom::document::AbstractDocument;
|
||||
use dom::node::{AbstractNode, ScriptView};
|
||||
use dom::navigator::Navigator;
|
||||
|
||||
use layout_interface::ReflowForScriptQuery;
|
||||
use script_task::{ExitMsg, FireTimerMsg, Page, ScriptChan};
|
||||
|
@ -41,6 +42,7 @@ pub struct Window {
|
|||
compositor: @ScriptListener,
|
||||
wrapper: WrapperCache,
|
||||
timer_chan: SharedChan<TimerControlMsg>,
|
||||
navigator: Option<@mut Navigator>,
|
||||
}
|
||||
|
||||
#[unsafe_destructor]
|
||||
|
@ -105,6 +107,13 @@ impl Window {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Navigator(&mut self) -> @mut Navigator {
|
||||
if self.navigator.is_none() {
|
||||
self.navigator = Some(Navigator::new());
|
||||
}
|
||||
self.navigator.unwrap()
|
||||
}
|
||||
|
||||
pub fn Confirm(&self, _message: &DOMString) -> bool {
|
||||
false
|
||||
}
|
||||
|
@ -189,6 +198,7 @@ impl Window {
|
|||
}
|
||||
SharedChan::new(timer_chan)
|
||||
},
|
||||
navigator: None,
|
||||
};
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue