|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.webkit.WebChromeClient
public class WebChromeClient
| Constructor Summary | |
|---|---|
WebChromeClient()
|
|
| Method Summary | |
|---|---|
void |
onCloseWindow(WebView window)
Notify the host application to close the given WebView and remove it from the view system if necessary. |
boolean |
onCreateWindow(WebView view,
boolean dialog,
boolean userGesture,
Message resultMsg)
Request the host application to create a new Webview. |
boolean |
onJsAlert(WebView view,
String url,
String message,
JsResult result)
Tell the client to display a javascript alert dialog. |
boolean |
onJsBeforeUnload(WebView view,
String url,
String message,
JsResult result)
Tell the client to display a dialog to confirm navigation away from the current page. |
boolean |
onJsConfirm(WebView view,
String url,
String message,
JsResult result)
Tell the client to display a confirm dialog to the user. |
boolean |
onJsPrompt(WebView view,
String url,
String message,
String defaultValue,
JsPromptResult result)
Tell the client to display a prompt dialog to the user. |
void |
onProgressChanged(WebView view,
int newProgress)
Tell the host application the current progress of loading a page. |
void |
onReceivedIcon(WebView view,
Bitmap icon)
Notify the host application of a new favicon for the current page. |
void |
onReceivedTitle(WebView view,
String title)
Notify the host application of a change in the document title. |
void |
onRequestFocus(WebView view)
Request display and focus for this WebView. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebChromeClient()
| Method Detail |
|---|
public void onProgressChanged(WebView view,
int newProgress)
view - The WebView that initiated the callback.newProgress - Current page loading progress, represented by
an integer between 0 and 100.
public void onReceivedTitle(WebView view,
String title)
view - The WebView that initiated the callback.title - A String containing the new title of the document.
public void onReceivedIcon(WebView view,
Bitmap icon)
view - The WebView that initiated the callback.icon - A Bitmap containing the favicon for the current page.
public boolean onCreateWindow(WebView view,
boolean dialog,
boolean userGesture,
Message resultMsg)
view - The WebView that initiated the callback.dialog - True if the new window is meant to be a small dialog
window.userGesture - True if the request was initiated by a user gesture
such as clicking a link.resultMsg - The message to send when done creating a new WebView.
Set the new WebView through resultMsg.obj which is
WebView.WebViewTransport() and then call
resultMsg.sendToTarget();
public void onRequestFocus(WebView view)
view - The WebView that needs to be focused.public void onCloseWindow(WebView window)
window - The WebView that needs to be closed.
public boolean onJsAlert(WebView view,
String url,
String message,
JsResult result)
view - The WebView that initiated the callback.url - The url of the page requesting the dialog.message - Message to be displayed in the window.result - A JsResult to confirm that the user hit enter.
public boolean onJsConfirm(WebView view,
String url,
String message,
JsResult result)
view - The WebView that initiated the callback.url - The url of the page requesting the dialog.message - Message to be displayed in the window.result - A JsResult used to send the user's response to
javascript.
public boolean onJsPrompt(WebView view,
String url,
String message,
String defaultValue,
JsPromptResult result)
view - The WebView that initiated the callback.url - The url of the page requesting the dialog.message - Message to be displayed in the window.defaultValue - The default value displayed in the prompt dialog.result - A JsPromptResult used to send the user's reponse to
javascript.
public boolean onJsBeforeUnload(WebView view,
String url,
String message,
JsResult result)
view - The WebView that initiated the callback.url - The url of the page requesting the dialog.message - Message to be displayed in the window.result - A JsResult used to send the user's response to
javascript.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||