Updated Branches: refs/heads/CordovaWebView afa1ecf3c -> f840f3ace
Setting up a default CordovaWebViewClient and CordovaChromeClient for when we are blowing up via XML layouts 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/f840f3ac Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/f840f3ac Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/f840f3ac Branch: refs/heads/CordovaWebView Commit: f840f3aceb2fd63c74c1d7b6fd7df81350169777 Parents: afa1ecf Author: Joe Bowser <bows...@apache.org> Authored: Tue May 15 15:30:15 2012 -0700 Committer: Joe Bowser <bows...@apache.org> Committed: Tue May 15 15:30:15 2012 -0700 ---------------------------------------------------------------------- .../src/org/apache/cordova/CordovaWebView.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/f840f3ac/framework/src/org/apache/cordova/CordovaWebView.java ---------------------------------------------------------------------- diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java index 720b4cc..1b60c15 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(); }