public class XWalkUIClient
extends XWalkUIClientInternal
| Modifier and Type | Class and Description |
|---|---|
static class |
XWalkUIClient.JavascriptMessageType
The type of JavaScript modal dialog.
|
static class |
XWalkUIClient.LoadStatus
The status when a page stopped loading
|
| Constructor and Description |
|---|
XWalkUIClient(XWalkView view)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onFullscreenToggled(XWalkView view,
boolean enterFullscreen)
Tell the client to toggle fullscreen mode.
|
void |
onFullscreenToggled(XWalkViewInternal view,
boolean enterFullscreen) |
void |
onJavascriptCloseWindow(XWalkView view)
Notify the client to close the given XWalkView.
|
void |
onJavascriptCloseWindow(XWalkViewInternal view) |
boolean |
onJavascriptModalDialog(XWalkViewInternal view,
JavascriptMessageTypeInternal typeInternal,
java.lang.String url,
java.lang.String message,
java.lang.String defaultValue,
XWalkJavascriptResultInternal result) |
boolean |
onJavascriptModalDialog(XWalkView view,
XWalkUIClient.JavascriptMessageType type,
java.lang.String url,
java.lang.String message,
java.lang.String defaultValue,
XWalkJavascriptResult result)
Tell the client to display a prompt dialog to the user.
|
void |
onPageLoadStarted(XWalkViewInternal view,
java.lang.String url) |
void |
onPageLoadStarted(XWalkView view,
java.lang.String url)
Notify the host application that a page has started loading.
|
void |
onPageLoadStopped(XWalkViewInternal view,
java.lang.String url,
LoadStatusInternal statusInternal) |
void |
onPageLoadStopped(XWalkView view,
java.lang.String url,
XWalkUIClient.LoadStatus status)
Notify the host application that a page has stopped loading.
|
void |
onReceivedTitle(XWalkViewInternal view,
java.lang.String title) |
void |
onReceivedTitle(XWalkView view,
java.lang.String title)
Notify the host application of a change in the document title.
|
void |
onRequestFocus(XWalkView view)
Request display and focus for this XWalkView.
|
void |
onRequestFocus(XWalkViewInternal view) |
void |
onScaleChanged(XWalkView view,
float oldScale,
float newScale)
Notify the client that the scale applied to the XWalkView has changed.
|
void |
onScaleChanged(XWalkViewInternal view,
float oldScale,
float newScale) |
void |
onUnhandledKeyEvent(XWalkViewInternal view,
KeyEvent event) |
void |
onUnhandledKeyEvent(XWalkView view,
KeyEvent event)
Notify the host application that a key was not handled by the XWalkView.
|
void |
openFileChooser(XWalkView view,
Tell the client to open a file chooser.
|
void |
openFileChooser(XWalkViewInternal view,
|
boolean |
shouldOverrideKeyEvent(XWalkViewInternal view,
KeyEvent event) |
boolean |
shouldOverrideKeyEvent(XWalkView view,
KeyEvent event)
Give the host application a chance to handle the key event synchronously.
|
public XWalkUIClient(XWalkView view)
view - the owner XWalkView instance.public boolean onJavascriptModalDialog(XWalkView view, XWalkUIClient.JavascriptMessageType type, java.lang.String url, java.lang.String message, java.lang.String defaultValue, XWalkJavascriptResult result)
view - the owner XWalkView instance.type - the type of JavaScript modal dialog.url - the url of the web page which wants to show this dialog.message - the message to be shown.defaultValue - the default value string. Only valid for Prompt dialog.result - the callback to handle the result from caller.public boolean onJavascriptModalDialog(XWalkViewInternal view,
JavascriptMessageTypeInternal typeInternal,
java.lang.String url,
java.lang.String message,
java.lang.String defaultValue,
XWalkJavascriptResultInternal result)
public void onRequestFocus(XWalkView view)
view - the owner XWalkView instance.public void onRequestFocus(XWalkViewInternal view)
public void onJavascriptCloseWindow(XWalkView view)
view - the owner XWalkView instance.public void onJavascriptCloseWindow(XWalkViewInternal view)
public void onFullscreenToggled(XWalkView view, boolean enterFullscreen)
view - the owner XWalkView instance.enterFullscreen - true if it has entered fullscreen mode.public void onFullscreenToggled(XWalkViewInternal view,
boolean enterFullscreen)
public void openFileChooser(XWalkView view,uploadFile, java.lang.String acceptType, java.lang.String capture)
view - the owner XWalkView instance.uploadFile - the callback class to handle the result from caller. It MUST
be invoked in all cases. Leave it not invoked will block all following
requests to open file chooser.acceptType - value of the 'accept' attribute of the input tag associated
with this file picker.capture - value of the 'capture' attribute of the input tag associated
with this file pickerpublic void openFileChooser(XWalkViewInternal view,
uploadFile,
java.lang.String acceptType,
java.lang.String capture)
public void onScaleChanged(XWalkView view, float oldScale, float newScale)
view - the owner XWalkView instance.oldScale - the old scale before scaling.newScale - the current scale factor after scaling.public void onScaleChanged(XWalkViewInternal view,
float oldScale,
float newScale)
public boolean shouldOverrideKeyEvent(XWalkView view, KeyEvent event)
view - The XWalkView that is initiating the callback.event - The key event.public boolean shouldOverrideKeyEvent(XWalkViewInternal view,
KeyEvent event)
public void onUnhandledKeyEvent(XWalkView view, KeyEvent event)
view - The XWalkView that is initiating the callback.event - The key event.public void onUnhandledKeyEvent(XWalkViewInternal view,
KeyEvent event)
public void onReceivedTitle(XWalkView view, java.lang.String title)
view - The XWalkView that initiated the callback.title - A String containing the new title of the document.public void onReceivedTitle(XWalkViewInternal view,
java.lang.String title)
public void onPageLoadStarted(XWalkView view, java.lang.String url)
view - The XWalkView that is initiating the callback.url - The url to be loaded.public void onPageLoadStarted(XWalkViewInternal view,
java.lang.String url)
public void onPageLoadStopped(XWalkView view, java.lang.String url, XWalkUIClient.LoadStatus status)
XWalkView.PictureListener#onNewPicture.view - The XWalkView that is initiating the callback.url - The url of the page.status - the status when the page stopped loading.public void onPageLoadStopped(XWalkViewInternal view,
java.lang.String url,
LoadStatusInternal statusInternal)