You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bc...@apache.org on 2012/05/15 17:00:35 UTC
[2/2] android commit: Add comments.
Add comments.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/9f5f4973
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/9f5f4973
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/9f5f4973
Branch: refs/heads/CordovaWebView
Commit: 9f5f4973ae0845e1d1349f8c48f06424d5bd9728
Parents: 441785b
Author: Bryce Curtis <cu...@gmail.com>
Authored: Tue May 15 09:55:55 2012 -0500
Committer: Bryce Curtis <cu...@gmail.com>
Committed: Tue May 15 09:55:55 2012 -0500
----------------------------------------------------------------------
.../org/apache/cordova/CordovaWebViewClient.java | 27 +++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/9f5f4973/framework/src/org/apache/cordova/CordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java
index b118a90..bda0330 100755
--- a/framework/src/org/apache/cordova/CordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java
@@ -206,6 +206,15 @@ public class CordovaWebViewClient extends WebViewClient {
}
}
+ /**
+ * Notify the host application that a page has started loading.
+ * This method is called once for each main frame load so a page with iframes or framesets will call onPageStarted
+ * one time for the main frame. This also 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 webview initiating the callback.
+ * @param url The url of the page.
+ */
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// Clear history so history.back() doesn't do anything.
@@ -230,6 +239,7 @@ public class CordovaWebViewClient extends WebViewClient {
/**
* 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.
*
* @param view The webview initiating the callback.
* @param url The url of the page.
@@ -319,6 +329,16 @@ public class CordovaWebViewClient extends WebViewClient {
this.appView.postMessage("onReceivedError", data);
}
+ /**
+ * Notify the host application that an SSL error occurred while loading a resource.
+ * The host application must call either handler.cancel() or handler.proceed().
+ * Note that the decision may be retained for use in response to future SSL errors.
+ * The default behavior is to cancel the load.
+ *
+ * @param view The WebView that is initiating the callback.
+ * @param handler An SslErrorHandler object that will handle the user's response.
+ * @param error The SSL error object.
+ */
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
@@ -341,6 +361,13 @@ public class CordovaWebViewClient extends WebViewClient {
}
}
+ /**
+ * Notify the host application to update its visited links database.
+ *
+ * @param view The WebView that is initiating the callback.
+ * @param url The url being visited.
+ * @param isReload True if this url is being reloaded.
+ */
@Override
public void doUpdateVisitedHistory(WebView view, String url, boolean isReload) {
/*