Build 1.0_r1(from source)

android.webkit
Class CallbackProxy

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

 class CallbackProxy
extends Handler

This class is a proxy class for handling WebCore -> UI thread messaging. All the callback functions are called from the WebCore thread and messages are posted to the UI thread for the actual client callback.


Constructor Summary
CallbackProxy(Context context, WebView w)
          Construct a new CallbackProxy.
 
Method Summary
 WebView createWindow(boolean dialog, boolean userGesture)
           
 void doUpdateVisitedHistory(String url, boolean isReload)
           
 WebBackForwardList getBackForwardList()
          Get the Back/Forward list to return to the user or to update the cached history list.
 int getProgress()
          Return the latest progress.
 void handleMessage(Message msg)
          Subclasses must implement this to receive messages.
 void onCloseWindow(WebView window)
           
 boolean onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength)
          Starts a download if a download listener has been registered, otherwise return false.
 void onFormResubmission(Message dontResend, Message resend)
           
 void onJsAlert(String url, String message)
           
 boolean onJsBeforeUnload(String url, String message)
           
 boolean onJsConfirm(String url, String message)
           
 String onJsPrompt(String url, String message, String defaultValue)
           
 void onLoadResource(String url)
           
 void onPageFinished(String url)
           
 void onPageStarted(String url, Bitmap favicon)
           
 void onProgressChanged(int newProgress)
           
 void onReceivedCertificate(SslCertificate certificate)
           
 void onReceivedError(int errorCode, String description, String failingUrl)
           
 void onReceivedHttpAuthRequest(HttpAuthHandler handler, String hostName, String realmName)
           
 void onReceivedIcon(Bitmap icon)
           
 void onReceivedSslError(SslErrorHandler handler, SslError error)
           
 void onReceivedTitle(String title)
           
 void onRequestFocus()
           
 boolean onSavePassword(String host, String username, String password, Message resumeMsg)
           
 void onScaleChanged(float oldScale, float newScale)
           
 void onTooManyRedirects(Message cancelMsg, Message continueMsg)
           
 void onUnhandledKeyEvent(KeyEvent event)
           
 void setDownloadListener(DownloadListener client)
          Set the client DownloadListener.
 void setWebChromeClient(WebChromeClient client)
          Set the WebChromeClient.
 void setWebViewClient(WebViewClient client)
          Set the WebViewClient.
 boolean shouldOverrideUrlLoading(String url)
          Called by the WebCore side
(package private)  void switchOutDrawHistory()
          Called by WebCore side to switch out of history Picture drawing mode
 boolean uiOverrideKeyEvent(KeyEvent event)
          Called by UI side.
 boolean uiOverrideUrlLoading(String overrideUrl)
          Called by the UI side.
 
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
 

Constructor Detail

CallbackProxy

public CallbackProxy(Context context,
                     WebView w)
Construct a new CallbackProxy.

Method Detail

setWebViewClient

public void setWebViewClient(WebViewClient client)
Set the WebViewClient.

Parameters:
client - An implementation of WebViewClient.

setWebChromeClient

public void setWebChromeClient(WebChromeClient client)
Set the WebChromeClient.

Parameters:
client - An implementation of WebChromeClient.

setDownloadListener

public void setDownloadListener(DownloadListener client)
Set the client DownloadListener.

Parameters:
client - An implementation of DownloadListener.

getBackForwardList

public WebBackForwardList getBackForwardList()
Get the Back/Forward list to return to the user or to update the cached history list.


uiOverrideUrlLoading

public boolean uiOverrideUrlLoading(String overrideUrl)
Called by the UI side. Calling overrideUrlLoading from the WebCore side will post a message to call this method.


uiOverrideKeyEvent

public boolean uiOverrideKeyEvent(KeyEvent event)
Called by UI side.


handleMessage

public void handleMessage(Message msg)
Description copied from class: Handler
Subclasses must implement this to receive messages.

Overrides:
handleMessage in class Handler

getProgress

public int getProgress()
Return the latest progress.


switchOutDrawHistory

void switchOutDrawHistory()
Called by WebCore side to switch out of history Picture drawing mode


onPageStarted

public void onPageStarted(String url,
                          Bitmap favicon)

onPageFinished

public void onPageFinished(String url)

onTooManyRedirects

public void onTooManyRedirects(Message cancelMsg,
                               Message continueMsg)

onReceivedError

public void onReceivedError(int errorCode,
                            String description,
                            String failingUrl)

onFormResubmission

public void onFormResubmission(Message dontResend,
                               Message resend)

shouldOverrideUrlLoading

public boolean shouldOverrideUrlLoading(String url)
Called by the WebCore side


onReceivedHttpAuthRequest

public void onReceivedHttpAuthRequest(HttpAuthHandler handler,
                                      String hostName,
                                      String realmName)

onReceivedSslError

public void onReceivedSslError(SslErrorHandler handler,
                               SslError error)

onReceivedCertificate

public void onReceivedCertificate(SslCertificate certificate)

doUpdateVisitedHistory

public void doUpdateVisitedHistory(String url,
                                   boolean isReload)

onLoadResource

public void onLoadResource(String url)

onUnhandledKeyEvent

public void onUnhandledKeyEvent(KeyEvent event)

onScaleChanged

public void onScaleChanged(float oldScale,
                           float newScale)

onDownloadStart

public boolean onDownloadStart(String url,
                               String userAgent,
                               String contentDisposition,
                               String mimetype,
                               long contentLength)
Starts a download if a download listener has been registered, otherwise return false.


onSavePassword

public boolean onSavePassword(String host,
                              String username,
                              String password,
                              Message resumeMsg)

onProgressChanged

public void onProgressChanged(int newProgress)

createWindow

public WebView createWindow(boolean dialog,
                            boolean userGesture)

onRequestFocus

public void onRequestFocus()

onCloseWindow

public void onCloseWindow(WebView window)

onReceivedIcon

public void onReceivedIcon(Bitmap icon)

onReceivedTitle

public void onReceivedTitle(String title)

onJsAlert

public void onJsAlert(String url,
                      String message)

onJsConfirm

public boolean onJsConfirm(String url,
                           String message)

onJsPrompt

public String onJsPrompt(String url,
                         String message,
                         String defaultValue)

onJsBeforeUnload

public boolean onJsBeforeUnload(String url,
                                String message)

Build 1.0_r1(from source)

Please submit a feedback, bug or feature