org.lobobrowser.html
Interface UserAgentContext
- SimpleUserAgentContext
public interface UserAgentContext
The user agent context.
HttpRequest | createHttpRequest() - Creates an instance of
HttpRequest which
can be used by the renderer to load images and implement the
Javascript XMLHttpRequest class.
|
String | getAppCodeName() - Gets browser "code" name.
|
String | getAppMinorVersion() - Gets browser application minor version.
|
String | getAppName() - Gets browser application name.
|
String | getAppVersion() - Gets browser application version.
|
String | getBrowserLanguage() - Gets browser language code.
|
String | getCookie(java.net.URL url) - Method used to implement document.cookie property.
|
String | getPlatform() - Gets the name of the user's operating system.
|
int | getScriptingOptimizationLevel() - Gets the scripting optimization level, which is a value
equivalent to Rhino's optimization level.
|
java.security.Policy | getSecurityPolicy() - Gets the security policy for scripting.
|
String | getUserAgent() - Should return the string used in
the User-Agent header.
|
boolean | isCookieEnabled() - Returns a boolean value indicating whether cookies are
enabled in the user agent.
|
boolean | isMedia(String mediaName) - Returns true if the current media matches the name provided.
|
boolean | isScriptingEnabled() - Returns a boolean value indicating whether scripting
is enabled in the user agent.
|
void | setCookie(java.net.URL url, String cookieSpec) - Method used to implement document.cookie property.
|
createHttpRequest
public HttpRequest createHttpRequest()
Creates an instance of
HttpRequest
which
can be used by the renderer to load images and implement the
Javascript XMLHttpRequest class.
getAppCodeName
public String getAppCodeName()
Gets browser "code" name.
getAppMinorVersion
public String getAppMinorVersion()
Gets browser application minor version.
getAppName
public String getAppName()
Gets browser application name.
getAppVersion
public String getAppVersion()
Gets browser application version.
getBrowserLanguage
public String getBrowserLanguage()
getCookie
public String getCookie(java.net.URL url)
Method used to implement document.cookie property.
getPlatform
public String getPlatform()
Gets the name of the user's operating system.
getScriptingOptimizationLevel
public int getScriptingOptimizationLevel()
Gets the scripting optimization level, which is a value
equivalent to Rhino's optimization level.
getSecurityPolicy
public java.security.Policy getSecurityPolicy()
Gets the security policy for scripting. Return null
if JavaScript code is trusted.
getUserAgent
public String getUserAgent()
Should return the string used in
the User-Agent header.
isCookieEnabled
public boolean isCookieEnabled()
Returns a boolean value indicating whether cookies are
enabled in the user agent.
isMedia
public boolean isMedia(String mediaName)
Returns true if the current media matches the name provided.
isScriptingEnabled
public boolean isScriptingEnabled()
Returns a boolean value indicating whether scripting
is enabled in the user agent.
setCookie
public void setCookie(java.net.URL url,
String cookieSpec)
Method used to implement document.cookie property.
cookieSpec
- Specification of cookies, as they
would appear in the Set-Cookie
header value of HTTP.