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.
Comment 1 by gsennton@chromium.org
, Nov 6 2017