From f840f3aceb2fd63c74c1d7b6fd7df81350169777 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 15 May 2012 15:30:15 -0700 Subject: [PATCH] Setting up a default CordovaWebViewClient and CordovaChromeClient for when we are blowing up via XML layouts --- framework/src/org/apache/cordova/CordovaWebView.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java index 720b4cc9..1b60c158 100644 --- a/framework/src/org/apache/cordova/CordovaWebView.java +++ b/framework/src/org/apache/cordova/CordovaWebView.java @@ -92,6 +92,7 @@ public class CordovaWebView extends WebView { /** * Constructor. * + * * @param context * @param attrs */ @@ -105,7 +106,8 @@ public class CordovaWebView extends WebView { { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } - + this.setWebChromeClient(new CordovaChromeClient(this.mCtx)); + this.setWebViewClient(new CordovaWebViewClient(this.mCtx)); this.loadConfiguration(); this.setup(); } @@ -116,7 +118,7 @@ public class CordovaWebView extends WebView { * @param context * @param attrs * @param defStyle - * @throws CordovaException + * */ public CordovaWebView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); @@ -128,6 +130,8 @@ public class CordovaWebView extends WebView { { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } + this.setWebChromeClient(new CordovaChromeClient(this.mCtx)); + this.setWebViewClient(new CordovaWebViewClient(this.mCtx)); this.loadConfiguration(); this.setup(); } @@ -150,6 +154,8 @@ public class CordovaWebView extends WebView { { Log.d(TAG, "Your activity must implement CordovaInterface to work"); } + this.setWebChromeClient(new CordovaChromeClient(this.mCtx)); + this.setWebViewClient(new CordovaWebViewClient(this.mCtx)); this.loadConfiguration(); this.setup(); }