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 221C3175EA for ; Tue, 4 Nov 2014 04:59:08 +0000 (UTC) Received: (qmail 46584 invoked by uid 500); 4 Nov 2014 04:59:07 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 46544 invoked by uid 500); 4 Nov 2014 04:59:07 -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 46532 invoked by uid 99); 4 Nov 2014 04:59:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2014 04:59:07 +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 (athena.apache.org: domain of purplecabbage@gmail.com designates 209.85.214.177 as permitted sender) Received: from [209.85.214.177] (HELO mail-ob0-f177.google.com) (209.85.214.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2014 04:59:03 +0000 Received: by mail-ob0-f177.google.com with SMTP id m8so9854685obr.22 for ; Mon, 03 Nov 2014 20:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MSXePWHYLpcmFopyuUzy/94lySIBVFVlGez+oeo/NEE=; b=LULx/LPq+km5lEVK0nmo5+zSBnG1fZzrev5tRV4j7e1bfdW/1iFNkjxbxPhl2c+dcK CVSJx5/Nz6XK/6zV7L5STeO0Q53JJAO+EEdJZ8LtpWxxFpYoflAbmTpjuMPm+TcP/p+q R2YXQZfnYdVLfS6k5el7SVbV1h0GM4pn4ZA5B7nBXacjkF8FPZBGOpz9TjrnOFPG2nPc Ps6Nn6+7HQQicnCiCjm5Qpx1Ub8nHy0CjWBabCHahbl7gBzemCibp7TDMZsrU2EtLMG9 fn9u/D7YCDVrtov3f1R7BRp+xxQul7F+4K56AG5rxtzxZGqHso7O4qaTciJQpj+zdv6d 2pHg== MIME-Version: 1.0 X-Received: by 10.182.138.105 with SMTP id qp9mr40948698obb.6.1415077122501; Mon, 03 Nov 2014 20:58:42 -0800 (PST) Received: by 10.76.7.135 with HTTP; Mon, 3 Nov 2014 20:58:42 -0800 (PST) In-Reply-To: References: Date: Mon, 3 Nov 2014 20:58:42 -0800 Message-ID: Subject: Re: [Android] CordovaBridge: Public or Private API From: Jesse To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=e89a8ff1cde83770e10507015184 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff1cde83770e10507015184 Content-Type: text/plain; charset=UTF-8 What if each webview implementation injected it's own exec function? This would/could apply also to platform's webviews. The cordova-js version of exec, could simply queue exec calls if they happened pre-deviceready. I have experimented with this in the past, and verified that Windows, WP8, and iOS could easily support it. @purplecabbage risingj.com On Mon, Nov 3, 2014 at 7:52 PM, Andrew Grieve wrote: > Hmm, yeah, CordovaBridge is very much tied to the idea that a bridge has > prompt mode, which tells the origin, and a js mode which uses a token to > verify it's trusted. Both of these concepts are fairly > webview-implementation specific. > > The only thing in there that seems webview-agnostic is the reset() > function. So, maybe create a CordovaBridge abstract base class that just > has reset() and make that what the webview impl uses as its type? > > Not sure if that's along the lines of what you're thinking... > > On Mon, Nov 3, 2014 at 2:24 PM, Joe Bowser wrote: > > > Hey > > > > I'm still working on the Mozilla Bridge and I'm running into problems > with > > how non-modular the current bridge is and how it was abstracted. When we > > created the ExposedJsApi class and added it to the API, we did so because > > we may need to abstract the whole bridge later. However, right now both > > Crosswalk and Android WebView share the CordovaBridge, including its > > encoding. Since GeckoView now has its own bridge (which includes some JS > > code that needs to override the Android defaults), I'm wondering whether > we > > should expose the CordovaBridge and allow it to be implemented or not. > > There is a lot of shared code, but at the same time I don't know how much > > code will be shared between the MozillaView and the default. > > > > Either way, I'm getting pretty close to a workable prototype soon and > then > > we can start work on getting the MobileSpec tests passing. Once the > plugin > > is broken out so that it can be installed using plugman or the CLI, we > can > > get more people looking at it. > > > > But yeah, any thoughts on this would be great. > > > > Joe > > > --e89a8ff1cde83770e10507015184--