IsomorphicObjectBoundaryInterface
interface IsomorphicObjectBoundaryInterface
JsReplyProxyBoundaryInterface |
Boundary interface for org.chromium.android_webview.WebMessageListener. |
WebViewRendererBoundaryInterface |
Boundary interface for WebViewRenderer. |
Boundary interface to be implemented by any type that needs to maintain an isomorphism (i.e. a 1:1 mapping) between the support library objects and their corresponding internal WebView objects.
Summary
Public functions |
|
---|---|
Any? |
getOrCreatePeer(creationCallable: Callable<Any?>?) Get the peer object associated with this object. |
Public functions
getOrCreatePeer
fun getOrCreatePeer(creationCallable: Callable<Any?>?): Any?
Get the peer object associated with this object. One of the pair of classes for which the corresponding objects need to maintain a lazy 1:1 mapping between support library and webview should implement this interface. The mapping is lazy in the sense that one object in the pair (the peer) may be created at an arbitrary point after the other, but once both objects exist their lifetimes become tied and the 1:1 mapping is maintained. Whether this interface should be implemented by the support library class or the webview class depends on which side can be created and exist independently. For example, AwRenderProcess objects are created by WebView before being passed to the support library, and thus SupportLibWebViewRendererAdapter should implement this interface.
Parameters | |
---|---|
creationCallable: Callable<Any?>? |
A callable that can be used to construct an appropriate peer object, if one is required. |
Returns | |
---|---|
Any? |
The peer object associated with this object, which either exists already, or has been freshly created and recorded. |