Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F2F8102BC for ; Tue, 27 Aug 2013 14:45:56 +0000 (UTC) Received: (qmail 87099 invoked by uid 500); 27 Aug 2013 14:45:56 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 86869 invoked by uid 500); 27 Aug 2013 14:45:53 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 86855 invoked by uid 99); 27 Aug 2013 14:45:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Aug 2013 14:45:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of iclelland@google.com designates 209.85.214.173 as permitted sender) Received: from [209.85.214.173] (HELO mail-ob0-f173.google.com) (209.85.214.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Aug 2013 14:45:46 +0000 Received: by mail-ob0-f173.google.com with SMTP id ta17so4806712obb.32 for ; Tue, 27 Aug 2013 07:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=uc4G/8CTeL5DbFR0lQzYe6ivYdMcHg7SbbUYNVrdWOQ=; b=F4Vb/kHI081HCCk1PxPY8AMUib4IMXoArr4t4qRWTatKkAe2XEY/2/A+77cvzdewXU a+7nn0KNygkn7Jl4VVRHnxUIbMKa3B/GCGgFx6JwsCM0Qyw7l6peLtpEokcaalEoQQGx W54h4EdwRJVSzOWymyS2iAg+rAMfJY4Wn05jWdWnqpxUKBPR5WP3ivlgYsN6iYOM0ZBw ezD2Udp5ay7dM+IVMHyi1JI23fH+laYlCp6aNsq0gvgJbksmW9LtjseoUJXPrbF3Z9Wm CbwgbFB7NSRUAX10Ln5ggAdkEk9Od2dYa9uKkfWLplejbWPlRzC6dg5mnDV0d1xviXXU g9uQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=uc4G/8CTeL5DbFR0lQzYe6ivYdMcHg7SbbUYNVrdWOQ=; b=nq5jW+WRzHWs4DoiYBbw16AraEOL2xJUprYohAXio8X5J5hzq5d9kg2F5eg950Hz8h x0+rQTHBL7V2FqLpuWWFIiMNyJpRCpezqbE36y3Gziwz5nPhO+4Joc3VkelaJWuQ7yA8 pOH6M2Kr4o6rCcxS36bIzFHqVoppm8GP0D56w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=uc4G/8CTeL5DbFR0lQzYe6ivYdMcHg7SbbUYNVrdWOQ=; b=l8oIWLsBakG6Zlfw1bZPRD9aeCwBDqvNKrpMbZYsSdtvF9+s5vnbdQmBCKXzQ9eMWQ Bv7b4nWxJNySb+2IjPc8XNKMHmDEJlAytvj3v4qbvgDzz552F9BhPoGPbu/7RI/QwmIW Gt+FP0112sxTeLOchS0puDDC1IBps1MN6RRkykymu89GioGswt4klgTgyI24oE4nxBKL O02raJ85rY8tVX2meaOFLrc2gQ97XITC25y+Ol804qZm8HuSksYRQrXYOWqiBz25jcLj /82zKLpwyhh7n03HQe39ZRd80ghrwMtHO0zn9CaDYUv/u9fXmRhgfskjVQDmucr4GCVF hVLA== X-Gm-Message-State: ALoCoQluiyU8Dj7dw2M93qtv8GDxv1t0Pts7AjiWtvQkpyYxMn8QaN+BcE1o3QMzQd/tFH1x3PkhMYvKPBxYnVya05YHUhF3oLez8U7XBSL/r2yexYO8ynO5VALg0VIVnTssAKKAi5LhfMoUCKIv/CoLKUOy9WB4cPydg1PI+AzKCmhHjcRRvKVxNBivcZahS+DnRSrJrJvfhUrDuzvk/2A7gDf8AhTjhQ== X-Received: by 10.60.93.105 with SMTP id ct9mr7307046oeb.42.1377614725169; Tue, 27 Aug 2013 07:45:25 -0700 (PDT) MIME-Version: 1.0 Sender: iclelland@google.com Received: by 10.182.102.73 with HTTP; Tue, 27 Aug 2013 07:45:05 -0700 (PDT) In-Reply-To: <65843418706200230@unknownmsgid> References: <65843418706200230@unknownmsgid> From: Ian Clelland Date: Tue, 27 Aug 2013 10:45:05 -0400 X-Google-Sender-Auth: yg1tyfVgqOxcvx_ULYoCwDHL0fg Message-ID: Subject: Re: Extending CordovaWebView To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7b33d5a054dab404e4eeec3d X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33d5a054dab404e4eeec3d Content-Type: text/plain; charset=UTF-8 Issues CB-4671 and CB-4678 added to JIRA for this. If I have time this week, I'll take a stab at implementing them. On Fri, Aug 23, 2013 at 12:30 PM, Ally Ogilvie wrote: > Hell. Yes. Plus all the things you just wrote +1 > > Sharing is caring... Is why i want accessibility in plugins for maximum > awesomeness. > > Sent from my Windows Phone From: Ian Clelland > Sent: 23/08/2013 23:41 > To: dev@cordova.apache.org > Subject: Re: Extending CordovaWebView > On Thu, Aug 22, 2013 at 8:43 PM, Ally Ogilvie wrote: > > > > First is that there is no way to use a custom WebView / WebViewClient / > > > ChromeClient class within the CLI system, without writing custom native > > > code after your project has been created. > > > > Not sure about the CLI system, don't really use it. Call me old school > but > > I love my jars 'n frameworks. There is of course another reason for this; > > Cordova is very much a framework for me, NOT a platform. I think it's > > crucial to remember there are many reasons to use Cordova in a project, > it > > can often be just as a means to get a little extra accessibility and > > browser standardisation out of the WebView. The rest of the app could be > > 80% native with heaps of other SDKs... > > > > That is absolutely a valid use of Cordova, and underscores the point that > the tools which underlie CLI should be even more stable than CLI itself. > (Which I think is true right now) > > If you're using Cordova in that way, then most of this discussion wouldn't > even apply -- your start-of-project flow can just be > "cordova-android/bin/create newproject com.example.newproject", and then > you can start editing (or just throw away) the default Activity class. > Nothing here is going to get in the way of that. > > > > > > > >For Mobile Chrome Apps, we have a need to subclass the > CordovaChromeClient > > >class used by our applications. There's not currently a way to do that > in > > >the CLI world > > > > Ian, I know you are using CLI, but IF you were not, you would subclass > > CordovaChromeClient on your application's main Activity?? I see no > sensible > > way to do it on a Plugin without going thread crazy... I can separate a > > thread if you want to keep this CLI related, but I feel the plugin > > developer use case should be considered in this thread too. > > > > The only reason I can imagine for me not to use CLI would be if I was > creating a single-platform application, for which I knew that I was going > to be making a lot of native code modifications. In that case, I would > absolutely introduce my own subclass of CordovaChromeClient, and import it > in my main Activity, and override init() to create the right objects. > > But that only works for my application; it doesn't give me anything that I > can share with other developers without also instructing them to modify > their code in the same way. > > There's no way right now to encapsulate this sort of change in a plugin. > The CordovaWebView/Client/ChromeClient are necessarily singletons, and it's > probably not a good idea to allow plugins to arbitrarily replace them. We > could conceivably come up with a new sort of plugin that can do it -- and > you could only install one such plugin per project -- but people could also > just distribute custom app templates which do pretty much the same thing. > > > > > > I'm 100% hopeful that at a minimum more methods (WebView and > WebViewCient) > > can be exposed to the Plugins. > > > > For individual methods, right now lets just name them specifically, and we > can add delegation to the plugins for them. Later, I think we can move to a > generic registration / notification architecture, once we have a good > design for that. > > I've heard calls for: > - disableTouchEvents > - registerGestureHandler > - onReceivedHttpAuthRequest > - getHttpAuthUsernamePassword > > We can create some issues for those, and get them implemented. > > Ian > --047d7b33d5a054dab404e4eeec3d--