mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Creating the CordovaWebView, modifying DroidGap to use that
This commit is contained in:
parent
9d0e8fa436
commit
e25490751c
26
framework/src/org/apache/cordova/CordovaWebView.java
Normal file
26
framework/src/org/apache/cordova/CordovaWebView.java
Normal file
@ -0,0 +1,26 @@
|
||||
package org.apache.cordova;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.webkit.WebView;
|
||||
|
||||
public class CordovaWebView extends WebView {
|
||||
|
||||
public CordovaWebView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public CordovaWebView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public CordovaWebView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
public CordovaWebView(Context context, AttributeSet attrs, int defStyle,
|
||||
boolean privateBrowsing) {
|
||||
super(context, attrs, defStyle, privateBrowsing);
|
||||
}
|
||||
|
||||
}
|
@ -150,7 +150,7 @@ public class DroidGap extends Activity implements CordovaInterface {
|
||||
public static String TAG = "DroidGap";
|
||||
|
||||
// The webview for our app
|
||||
protected WebView appView;
|
||||
protected CordovaWebView appView;
|
||||
protected WebViewClient webViewClient;
|
||||
private ArrayList<Pattern> whiteList = new ArrayList<Pattern>();
|
||||
private HashMap<String, Boolean> whiteListCache = new HashMap<String,Boolean>();
|
||||
@ -349,7 +349,7 @@ public class DroidGap extends Activity implements CordovaInterface {
|
||||
* Create and initialize web container with default web view objects.
|
||||
*/
|
||||
public void init() {
|
||||
this.init(new WebView(DroidGap.this), new CordovaWebViewClient(this), new CordovaChromeClient(DroidGap.this));
|
||||
this.init(new CordovaWebView(DroidGap.this), new CordovaWebViewClient(this), new CordovaChromeClient(DroidGap.this));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -359,7 +359,7 @@ public class DroidGap extends Activity implements CordovaInterface {
|
||||
* @param webViewClient
|
||||
* @param webChromeClient
|
||||
*/
|
||||
public void init(WebView webView, WebViewClient webViewClient, WebChromeClient webChromeClient) {
|
||||
public void init(CordovaWebView webView, WebViewClient webViewClient, WebChromeClient webChromeClient) {
|
||||
LOG.d(TAG, "DroidGap.init()");
|
||||
|
||||
// Set up web container
|
||||
|
Loading…
Reference in New Issue
Block a user