Build 1.0_r1(from source)

android.webkit
Class BrowserFrame

java.lang.Object
  extended by android.os.Handler
      extended by android.webkit.BrowserFrame

 class BrowserFrame
extends Handler


Field Summary
(package private) static int FRAME_COMPLETED
           
(package private) static int FRAME_LOADTYPE_BACK
           
(package private) static int FRAME_LOADTYPE_FORWARD
           
(package private) static int FRAME_LOADTYPE_INDEXEDBACKFORWARD
           
(package private) static int FRAME_LOADTYPE_REDIRECT
           
(package private) static int FRAME_LOADTYPE_RELOAD
           
(package private) static int FRAME_LOADTYPE_RELOADALLOWINGSTALEDATA
           
(package private) static int FRAME_LOADTYPE_REPLACE
           
(package private) static int FRAME_LOADTYPE_SAME
           
(package private) static int FRAME_LOADTYPE_STANDARD
           
(package private)  int mNativeFrame
           
(package private) static int POLICY_FUNCTION
           
(package private) static int POLICY_IGNORE
           
(package private) static int POLICY_USE
           
(package private) static JWebCoreJavaBridge sJavaBridge
           
 
Constructor Summary
BrowserFrame(Context context, WebViewCore w, CallbackProxy proxy, WebSettings settings)
          Create a new BrowserFrame to be used in an application.
 
Method Summary
 void addJavascriptInterface(Object obj, String interfaceName)
           
 boolean cacheDisabled()
           
(package private)  void certificate(SslCertificate certificate)
          We have received an SSL certificate for the main top-level page.
 void clearCache()
           
(package private)  boolean committed()
           
(package private)  String currentUrl()
           
 void destroy()
          Destroy all native components of the BrowserFrame.
(package private)  void didFirstLayout(String url)
           
 void documentAsText(Message callback)
          Retrieves the visual text of the current frame, puts it as the object for the message and sends the message.
 boolean documentHasImages()
          Return true if the document has images.
 void externalRepresentation(Message callback)
          Retrieves the render tree of this frame and puts it as the object for the message and sends the message.
(package private)  boolean firstLayoutDone()
           
(package private)  CallbackProxy getCallbackProxy()
          Get the CallbackProxy for sending messages to the UI thread.
(package private)  String getUserAgentString()
          Returns the User Agent used by this frame
 void goBackOrForward(int steps)
          Go back or forward the number of steps given.
 void handleMessage(Message msg)
          Handle messages posted to us.
 boolean handleUrl(String url)
          This method is called by WebCore to check whether application wants to hijack url loading
 void loadData(String baseUrl, String data, String mimeType, String encoding, String failUrl)
          Load the content as if it was loaded by the provided base URL.
(package private)  int loadType()
           
 void loadUrl(String url)
          Load a url from the network or the filesystem into the main frame.
 void nativeDestroyFrame()
          Destroy the native frame.
 void reload(boolean allowStale)
          Reload the current main frame.
 void stopLoading()
          Stop loading the current page.
 String stringByEvaluatingJavaScriptFromString(String script)
          stringByEvaluatingJavaScriptFromString will execute the JS passed in in the context of this browser frame.
 
Methods inherited from class android.os.Handler
dispatchMessage, dump, getLooper, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FRAME_COMPLETED

static final int FRAME_COMPLETED
See Also:
Constant Field Values

POLICY_FUNCTION

static final int POLICY_FUNCTION
See Also:
Constant Field Values

FRAME_LOADTYPE_STANDARD

static final int FRAME_LOADTYPE_STANDARD
See Also:
Constant Field Values

FRAME_LOADTYPE_BACK

static final int FRAME_LOADTYPE_BACK
See Also:
Constant Field Values

FRAME_LOADTYPE_FORWARD

static final int FRAME_LOADTYPE_FORWARD
See Also:
Constant Field Values

FRAME_LOADTYPE_INDEXEDBACKFORWARD

static final int FRAME_LOADTYPE_INDEXEDBACKFORWARD
See Also:
Constant Field Values

FRAME_LOADTYPE_RELOAD

static final int FRAME_LOADTYPE_RELOAD
See Also:
Constant Field Values

FRAME_LOADTYPE_RELOADALLOWINGSTALEDATA

static final int FRAME_LOADTYPE_RELOADALLOWINGSTALEDATA
See Also:
Constant Field Values

FRAME_LOADTYPE_SAME

static final int FRAME_LOADTYPE_SAME
See Also:
Constant Field Values

FRAME_LOADTYPE_REDIRECT

static final int FRAME_LOADTYPE_REDIRECT
See Also:
Constant Field Values

FRAME_LOADTYPE_REPLACE

static final int FRAME_LOADTYPE_REPLACE
See Also:
Constant Field Values

mNativeFrame

int mNativeFrame

sJavaBridge

static JWebCoreJavaBridge sJavaBridge

POLICY_USE

static final int POLICY_USE
See Also:
Constant Field Values

POLICY_IGNORE

static final int POLICY_IGNORE
See Also:
Constant Field Values
Constructor Detail

BrowserFrame

public BrowserFrame(Context context,
                    WebViewCore w,
                    CallbackProxy proxy,
                    WebSettings settings)
Create a new BrowserFrame to be used in an application.

Parameters:
context - An application context to use when retrieving assets.
w - A WebViewCore used as the view for this frame.
proxy - A CallbackProxy for posting messages to the UI thread and querying a client for information.
settings - A WebSettings object that holds all settings. XXX: Called by WebCore thread.
Method Detail

loadUrl

public void loadUrl(String url)
Load a url from the network or the filesystem into the main frame. Following the same behaviour as Safari, javascript: URLs are not passed to the main frame, instead they are evaluated immediately.

Parameters:
url - The url to load.

loadData

public void loadData(String baseUrl,
                     String data,
                     String mimeType,
                     String encoding,
                     String failUrl)
Load the content as if it was loaded by the provided base URL. The failUrl is used as the history entry for the load data. If null or an empty string is passed for the failUrl, then no history entry is created.

Parameters:
baseUrl - Base URL used to resolve relative paths in the content
data - Content to render in the browser
mimeType - Mimetype of the data being passed in
encoding - Character set encoding of the provided data.
failUrl - URL to use if the content fails to load or null.

committed

boolean committed()

firstLayoutDone

boolean firstLayoutDone()

loadType

int loadType()

currentUrl

String currentUrl()

didFirstLayout

void didFirstLayout(String url)

certificate

void certificate(SslCertificate certificate)
We have received an SSL certificate for the main top-level page. !!!Called from the network thread!!!


destroy

public void destroy()
Destroy all native components of the BrowserFrame.


handleMessage

public void handleMessage(Message msg)
Handle messages posted to us.

Overrides:
handleMessage in class Handler
Parameters:
msg - The message to handle.

externalRepresentation

public void externalRepresentation(Message callback)
Retrieves the render tree of this frame and puts it as the object for the message and sends the message.

Parameters:
callback - the message to use to send the render tree

documentAsText

public void documentAsText(Message callback)
Retrieves the visual text of the current frame, puts it as the object for the message and sends the message.

Parameters:
callback - the message to use to send the visual text

handleUrl

public boolean handleUrl(String url)
This method is called by WebCore to check whether application wants to hijack url loading


addJavascriptInterface

public void addJavascriptInterface(Object obj,
                                   String interfaceName)

getCallbackProxy

CallbackProxy getCallbackProxy()
Get the CallbackProxy for sending messages to the UI thread.


getUserAgentString

String getUserAgentString()
Returns the User Agent used by this frame


nativeDestroyFrame

public void nativeDestroyFrame()
Destroy the native frame.


reload

public void reload(boolean allowStale)
Reload the current main frame.


goBackOrForward

public void goBackOrForward(int steps)
Go back or forward the number of steps given.

Parameters:
steps - A negative or positive number indicating the direction and number of steps to move.

stringByEvaluatingJavaScriptFromString

public String stringByEvaluatingJavaScriptFromString(String script)
stringByEvaluatingJavaScriptFromString will execute the JS passed in in the context of this browser frame.

Parameters:
script - A javascript string to execute
Returns:
string result of execution or null

cacheDisabled

public boolean cacheDisabled()

clearCache

public void clearCache()

stopLoading

public void stopLoading()
Stop loading the current page.


documentHasImages

public boolean documentHasImages()
Return true if the document has images.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature