Generate webview support library boundary interfaces |
|||||
Issue descriptionTo communicate between the webview support library and the webview glue both these modules will be built against a set of interfaces defined in the chromium source tree, here: https://cs.chromium.org/chromium/src/android_webview/support_library/boundary_interfaces/ These interfaces will be defined in a way that they can be passed across different class loaders - i.e. they will only reference objects that share a definition in both class loaders (objects that are defined in the parent classloader - the android framework classloader). These 'boundary interfaces' should be fairly straight-forward to generate - they should contain the same APIs as the existing android.webkit classes/interfaces used for communication between android.webkit and the existing webview glue, except any method parameters/return values that point to objects defined in android.webkit should be turned into InvocationHandlers. e.g 1. void WebView.postVisualStateCallback(long, VisualStateCallback) -> void WebView.postVisualStateCallback(long, InvocationHandler); 2. void WebView.setWebViewClient(WebViewClient) -> void WebView.setWebViewClient(InvocationHandler) 3. boolean WebViewClient.shouldOverrideUrlLoading(WebView, WebResourceRequest) -> boolean WebViewClient.shouldOverrideUrlLoading(InvocationHandler, InvocationHandler) Note that the boundary interfaces should all be pure interfaces (no abstract classes) because of how InvocationHandlers + Proxies work.
,
Feb 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0293525c239e35235b4ea8375d84956b4185efad commit 0293525c239e35235b4ea8375d84956b4185efad Author: Gustav Sennton <gsennton@google.com> Date: Wed Feb 14 15:43:45 2018 [Boundary interfaces] Add a package file to hide boundary interfaces Android publishes all public APIs that are not marked with the @hide annotation. Boundary interfaces are not supposed to be public to apps. In this CL we add a file with the sole purpose of hiding the boundary interface package from apps. Bug: 788177 Change-Id: I58c9c7a8445c1a3fdfda3164735f5e2c755dfc44 Reviewed-on: https://chromium-review.googlesource.com/918861 Reviewed-by: Richard Coles <torne@chromium.org> Commit-Queue: Gustav Sennton <gsennton@chromium.org> Cr-Commit-Position: refs/heads/master@{#536719} [add] https://crrev.com/0293525c239e35235b4ea8375d84956b4185efad/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/package-info.java
,
Feb 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e5f7a795c810e53cf9d0bfa6b7c31fd21c3b3e1c commit e5f7a795c810e53cf9d0bfa6b7c31fd21c3b3e1c Author: Gustav Sennton <gsennton@google.com> Date: Wed Feb 14 15:45:25 2018 [Boundary interfaces] Add utility methods for support library boundary The WebView support library (in the Android Support Library) and the WebView support library glue (in Chromium) will both need methods for mapping a class loaded in some ClassLoader into a class loaded in the current ClassLoader. In this CL we put that utility in the boundary interface directory to avoid duplicating this Class-conversion functionality in both the Android Support Library and Chromium (instead this functionality will be mirrored from Chromium into the support library). Bug: 788177 Change-Id: Icea382115bedd53d1b255d3a115fff03fcdb15ba Reviewed-on: https://chromium-review.googlesource.com/919062 Reviewed-by: Richard Coles <torne@chromium.org> Commit-Queue: Gustav Sennton <gsennton@chromium.org> Cr-Commit-Position: refs/heads/master@{#536720} [modify] https://crrev.com/e5f7a795c810e53cf9d0bfa6b7c31fd21c3b3e1c/android_webview/support_library/boundary_interfaces/BUILD.gn [add] https://crrev.com/e5f7a795c810e53cf9d0bfa6b7c31fd21c3b3e1c/android_webview/support_library/boundary_interfaces/src/org/chromium/support_lib_boundary/BoundaryInterfaceReflectionUtil.java
,
Apr 13 2018
,
Apr 13 2018
,
Apr 13 2018
,
Jun 5 2018
Closing this for now since we're no longer pursuing code generation for the support library. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by bugdroid1@chromium.org
, Feb 9 2018