Remove the NavigatorInfo struct.

It serves no purpose.
This commit is contained in:
Ms2ger 2015-01-09 12:10:08 +01:00
parent d9751c0fbb
commit 8afc104d4b
3 changed files with 33 additions and 37 deletions

View file

@ -5,33 +5,29 @@
use servo_util::str::DOMString;
use servo_util::opts;
pub struct NavigatorInfo;
pub fn Product() -> DOMString {
"Gecko".into_string()
}
impl NavigatorInfo {
pub fn Product() -> DOMString {
"Gecko".into_string()
}
pub fn TaintEnabled() -> bool {
false
}
pub fn TaintEnabled() -> bool {
false
}
pub fn AppName() -> DOMString {
"Netscape".into_string() // Like Gecko/Webkit
}
pub fn AppName() -> DOMString {
"Netscape".into_string() // Like Gecko/Webkit
}
pub fn AppCodeName() -> DOMString {
"Mozilla".into_string()
}
pub fn AppCodeName() -> DOMString {
"Mozilla".into_string()
}
pub fn Platform() -> DOMString {
"".into_string()
}
pub fn Platform() -> DOMString {
"".into_string()
}
pub fn UserAgent() -> DOMString {
match opts::get().user_agent {
Some(ref user_agent) => user_agent.clone(),
None => "".into_string(),
}
pub fn UserAgent() -> DOMString {
match opts::get().user_agent {
Some(ref user_agent) => user_agent.clone(),
None => "".into_string(),
}
}