* limitations under the License.
*/
-package org.xwalk.core;
+package org.xwalk.core.internal;
import android.app.Activity;
import android.app.AlertDialog;
/**
* It's the Internal class to handle legacy resource related callbacks not
- * handled by XWalkResourceClient.
+ * handled by XWalkResourceClientInternal.
*
* @hide
*/
private Context mContext;
private AlertDialog mDialog;
- private XWalkView mXWalkView;
+ private XWalkViewInternal mXWalkView;
- public XWalkClient(XWalkView view) {
+ public XWalkClient(XWalkViewInternal view) {
mContext = view.getContext();
mXWalkView = view;
}
/**
* Give the host application a chance to take over the control when a new
- * url is about to be loaded in the current XWalkView. If XWalkClient is not
- * provided, by default XWalkView will ask Activity Manager to choose the
+ * url is about to be loaded in the current XWalkViewInternal. If XWalkClient is not
+ * provided, by default XWalkViewInternal will ask Activity Manager to choose the
* proper handler for the url. If XWalkClient is provided, return true
* means the host application handles the url, while return false means the
- * current XWalkView handles the url.
+ * current XWalkViewInternal handles the url.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param url The url to be loaded.
- * @return True if the host application wants to leave the current XWalkView
+ * @return True if the host application wants to leave the current XWalkViewInternal
* and handle the url itself, otherwise return false.
*/
- public boolean shouldOverrideUrlLoading(XWalkView view, String url) {
+ public boolean shouldOverrideUrlLoading(XWalkViewInternal view, String url) {
return false;
}
* means that onPageStarted will not be called when the contents of an
* embedded frame changes, i.e. clicking a link whose target is an iframe.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param url The url to be loaded.
*/
- public void onPageStarted(XWalkView view, String url) {
+ public void onPageStarted(XWalkViewInternal view, String url) {
}
/**
* Notify the host application that a page has finished loading. This method
* is called only for main frame. When onPageFinished() is called, the
* rendering picture may not be updated yet. To get the notification for the
- * new Picture, use {@link XWalkView.PictureListener#onNewPicture}.
+ * new Picture, use {@link XWalkViewInternal.PictureListener#onNewPicture}.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param url The url of the page.
*/
- public void onPageFinished(XWalkView view, String url) {
+ public void onPageFinished(XWalkViewInternal view, String url) {
}
/**
- * Notify the host application that the renderer of XWalkView is hung.
+ * Notify the host application that the renderer of XWalkViewInternal is hung.
*
- * @param view The XWalkView on which the render is hung.
+ * @param view The XWalkViewInternal on which the render is hung.
*/
- public void onRendererUnresponsive(XWalkView view) {
+ public void onRendererUnresponsive(XWalkViewInternal view) {
}
/**
- * Notify the host application that the renderer of XWalkView is no longer hung.
+ * Notify the host application that the renderer of XWalkViewInternal is no longer hung.
*
- * @param view The XWalkView which becomes responsive now.
+ * @param view The XWalkViewInternal which becomes responsive now.
*/
- public void onRendererResponsive(XWalkView view) {
+ public void onRendererResponsive(XWalkViewInternal view) {
}
/**
* trying to load the resource. The default behavior is to send the cancel
* message.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param cancelMsg The message to send if the host wants to cancel
* @param continueMsg The message to send if the host wants to continue
- * @deprecated This method is no longer called. When the XWalkView encounters
+ * @deprecated This method is no longer called. When the XWalkViewInternal encounters
* a redirect loop, it will cancel the load.
*/
@Deprecated
- public void onTooManyRedirects(XWalkView view, Message cancelMsg,
+ public void onTooManyRedirects(XWalkViewInternal view, Message cancelMsg,
Message continueMsg) {
cancelMsg.sendToTarget();
}
* requested page was a result of a POST. The default is to not resend the
* data.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param dontResend The message to send if the browser should not resend
* @param resend The message to send if the browser should resend data
*/
- public void onFormResubmission(XWalkView view, Message dontResend,
+ public void onFormResubmission(XWalkViewInternal view, Message dontResend,
Message resend) {
dontResend.sendToTarget();
}
/**
* Notify the host application to update its visited links database.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param url The url being visited.
* @param isReload True if this url is being reloaded.
*/
- public void doUpdateVisitedHistory(XWalkView view, String url,
+ public void doUpdateVisitedHistory(XWalkViewInternal view, String url,
boolean isReload) {
}
* response to future SSL errors. The default behavior is to cancel the
* load.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param callback The callback class. Passing 'true' means accepting the
* ssl error and continue to load. Passing 'false' means
* forbidding to load the web page.
* @param error The SSL error object.
*/
- public void onReceivedSslError(XWalkView view, ValueCallback<Boolean> callback,
+ public void onReceivedSslError(XWalkViewInternal view, ValueCallback<Boolean> callback,
SslError error) {
final ValueCallback<Boolean> valueCallback = callback;
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(mContext);
/**
* Notify the host application that an SSL error occurred while loading a
- * resource, but the XWalkView chose to proceed anyway based on a
+ * resource, but the XWalkViewInternal chose to proceed anyway based on a
* decision retained from a previous response to onReceivedSslError().
* @hide
*/
- public void onProceededAfterSslError(XWalkView view, SslError error) {
+ public void onProceededAfterSslError(XWalkViewInternal view, SslError error) {
}
/**
* connection is suspended and waiting for the response. The
* default behavior is to cancel, returning no client certificate.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param handler A ClientCertRequestHandler object that will
* handle the user's response.
* @param host_and_port The host and port of the requesting server.
*/
// TODO: comment this method temporarily, will implemtent later when all
// dependencies are resovled.
- // public void onReceivedClientCertRequest(XWalkView view,
+ // public void onReceivedClientCertRequest(XWalkViewInternal view,
// ClientCertRequestHandler handler, String host_and_port) {
// handler.cancel();
// }
* Notify the host application to handle an authentication request. The
* default behavior is to cancel the request.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param handler The XWalkHttpAuthHandler that will handle the user's response.
* @param host The host requiring authentication.
* @param realm A description to help store user credentials for future
* visits.
*/
- public void onReceivedHttpAuthRequest(XWalkView view,
+ public void onReceivedHttpAuthRequest(XWalkViewInternal view,
XWalkHttpAuthHandler handler, String host, String realm) {
if (view == null) return;
/**
* Give the host application a chance to handle the key event synchronously.
* e.g. menu shortcut key events need to be filtered this way. If return
- * true, XWalkView will not handle the key event. If return false, XWalkView
+ * true, XWalkViewInternal will not handle the key event. If return false, XWalkViewInternal
* will always handle the key event, so none of the super in the view chain
* will see the key event. The default behavior returns false.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param event The key event.
* @return True if the host application wants to handle the key event
* itself, otherwise return false
*/
- public boolean shouldOverrideKeyEvent(XWalkView view, KeyEvent event) {
+ public boolean shouldOverrideKeyEvent(XWalkViewInternal view, KeyEvent event) {
return false;
}
/**
- * Notify the host application that a key was not handled by the XWalkView.
- * Except system keys, XWalkView always consumes the keys in the normal flow
+ * Notify the host application that a key was not handled by the XWalkViewInternal.
+ * Except system keys, XWalkViewInternal always consumes the keys in the normal flow
* or if shouldOverrideKeyEvent returns true. This is called asynchronously
* from where the key is dispatched. It gives the host application a chance
* to handle the unhandled key events.
*
- * @param view The XWalkView that is initiating the callback.
+ * @param view The XWalkViewInternal that is initiating the callback.
* @param event The key event.
*/
- public void onUnhandledKeyEvent(XWalkView view, KeyEvent event) {
+ public void onUnhandledKeyEvent(XWalkViewInternal view, KeyEvent event) {
// TODO: Commment the below code for compile
// ViewRootImpl root = view.getViewRootImpl();
// if (root != null) {
/**
* Notify the host application that a request to automatically log in the
* user has been processed.
- * @param view The XWalkView requesting the login.
+ * @param view The XWalkViewInternal requesting the login.
* @param realm The account realm used to look up accounts.
* @param account An optional account. If not null, the account should be
* checked against accounts on the device. If it is a valid
* account, it should be used to log in the user.
* @param args Authenticator specific arguments used to log in the user.
*/
- public void onReceivedLoginRequest(XWalkView view, String realm,
+ public void onReceivedLoginRequest(XWalkViewInternal view, String realm,
String account, String args) {
}
// TODO(yongsheng): legacy method. Consider removing it?
- public void onLoadResource(XWalkView view, String url) {
+ public void onLoadResource(XWalkViewInternal view, String url) {
}
}