You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by atta ur rehman <at...@gmail.com> on 2014/07/15 12:08:20 UTC

A question about IceCreamCordovaWebViewClient class

Hi folks,

Thank you very much for Cordova!

Is this the right place to ask why the line number 69 in the class
https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
returns null instead of return super.shouldInterceptRequest(view, url);

For the sake of argument, let's assume that I'm on Android 4.x and later,
and I have changed the class hierarchy in Cordova source where
CordovaWebViewClient extends from my XWebViewClient instead of stock
android framework WebViewClient.

In this case, I think ICCWVC should bubble the calls of
shouldInterceptRequest that it doesn't want to handle to give super classes
a change to handle them.

Any comments, please.

Thanks.

ATTA

Re: A question about IceCreamCordovaWebViewClient class

Posted by Andrew Grieve <ag...@chromium.org>.
The super implementation just returns null, so there's not really any value
in calling super here I don't think.

If you want to customize the class, then your custom class should extend it
rather than changing it to extend you class.


On Tue, Jul 15, 2014 at 8:42 AM, Joe Bowser <bo...@gmail.com> wrote:

> Probably a good idea.  If you want to send a pull-request, or at least
> file an issue, we can take a look at this.
>
> On Tue, Jul 15, 2014 at 3:08 AM, atta ur rehman <at...@gmail.com>
> wrote:
> > Hi folks,
> >
> > Thank you very much for Cordova!
> >
> > Is this the right place to ask why the line number 69 in the class
> >
> https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
> > returns null instead of return super.shouldInterceptRequest(view, url);
> >
> > For the sake of argument, let's assume that I'm on Android 4.x and later,
> > and I have changed the class hierarchy in Cordova source where
> > CordovaWebViewClient extends from my XWebViewClient instead of stock
> > android framework WebViewClient.
> >
> > In this case, I think ICCWVC should bubble the calls of
> > shouldInterceptRequest that it doesn't want to handle to give super
> classes
> > a change to handle them.
> >
> > Any comments, please.
> >
> > Thanks.
> >
> > ATTA
>

Re: A question about IceCreamCordovaWebViewClient class

Posted by Joe Bowser <bo...@gmail.com>.
Probably a good idea.  If you want to send a pull-request, or at least
file an issue, we can take a look at this.

On Tue, Jul 15, 2014 at 3:08 AM, atta ur rehman <at...@gmail.com> wrote:
> Hi folks,
>
> Thank you very much for Cordova!
>
> Is this the right place to ask why the line number 69 in the class
> https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/IceCreamCordovaWebViewClient.java
> returns null instead of return super.shouldInterceptRequest(view, url);
>
> For the sake of argument, let's assume that I'm on Android 4.x and later,
> and I have changed the class hierarchy in Cordova source where
> CordovaWebViewClient extends from my XWebViewClient instead of stock
> android framework WebViewClient.
>
> In this case, I think ICCWVC should bubble the calls of
> shouldInterceptRequest that it doesn't want to handle to give super classes
> a change to handle them.
>
> Any comments, please.
>
> Thanks.
>
> ATTA