1 https:// about:// data:// 安全网站
2,3 ,4 Tab,java framework webkit
2 DownloadListener-------webview---msubview 下载监听接口
mSubView.setDownloadListener(new DownloadListener() {
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength) {
mWebViewController.onDownloadStart(Tab.this, url, userAgent,
contentDisposition, mimetype, contentLength);
if (mSubView.copyBackForwardList().getSize() == 0) {
// This subwindow was opened for the sole purpose of
// downloading a file. Remove it.
mWebViewController.dismissSubWindow(Tab.this);
}
}
});
webkit
public interface DownloadListener {
/**
* Notify the host application that a file should be downloaded
* @param url The full url to the content that should be downloaded
* @param userAgent the user agent to be used for the download.
* @param contentDisposition Content-disposition http header, if
* present.
* @param mimetype The mimetype of the content reported by the server
* @param contentLength The file size reported by the server
*/
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype, long contentLength);
}
------WebViewClient implementation for the main WebView 当页面加载, 资源加载,页面访问错误等情况发生时调用
* Give the host application a chance to take over the control when a new
* url is about to be loaded in the current WebView. If WebViewClient is not
* provided, by default WebView will ask Activity Manager to choose the
* proper handler for the url. If WebViewClient is provided, return true
* means the host application handles the url, while return false means the
* current WebView handles the url.
private final WebViewClient mWebViewClient = new WebViewClient() {
shouldOverrideUrlLoading(..){...}
onPageStarted(..){...}
onPageFinished(..){....}
onLoadResource(...){...}
onReceivedError(...){...}
onReceivedSslError(...){...}
onReceivedClientCertRequest(...){...}
onReceivedHttpAuthRequest(...){...}
........................
}
4 private final WebChromeClient mWebChromeClient = new WebChromeClient() { 界面ui 数据库 。。。
onProgressChanged(..){..}
onReceivedTitle..
onReceivedIcon
onReceivedTouchIconUrl
onShowCustomView
onHideCustomView
onCreateWindow
onExceededDatabaseQuota
onReachedMaxAppCacheSize
openFileChooser
getVisitedHistory
JSresult相关。。。。。。。。。。。
}