New issue
Advanced search Search tips

Issue 781759 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Create a script for generating the WebView Support Library glue layer

Project Member Reported by gsennton@chromium.org, Nov 6 2017

Issue description

The WebView Support library glue layer is essentially a shim/delegation layer connection the support library with the Chromium Aw-layer (android_webview/java/src/org/chromium/android_webview/).

There are two reasons it would be nice to generate the glue-layer code:

1. The initial version of the glue layer will contain around 70 methods, writing the implementation for all of these is a bit of a pain.
2. Every time we roll the WebView support library with some new API into the chromium code base we will hit a compilation error (because the glue layer doesn't implement the new API), it would be useful to allow developers to just implement the new API(s) with a single button click (if possible).


I imagine this script essentially doing the following:
A. find which interfaces (declared in the support library) have not been implemented by the glue layer.
B. find methods in the Aw-layer that correspond to those interfaces, and call into those methods.

So for example, updating the support library to contain the method AwSettings.newApiInQ() will cause the script to trigger because ContentSettingsAdapter is missing newApiInQ().
The script will then look for newApiInQ() in  the Aw-layer, and find AwSettings.newApiInQ(), finally adding the method definition

@Override
public void newApiInQ() {
    mAwSettings.newApiInQ();
}

to ContentSettingsAdapter.
 
Labels: -M-55 M-65
Blocking: -781754
Labels: -M-65
Status: WontFix (was: Available)
There are lots of edge-cases here and atm we are not using code generation to generate the support library glue layer. We might look into this in the future.

Won't Fixing for now.

Sign in to add a comment