Modifier and Type | Class and Description |
---|---|
static interface |
WebViewDelegate.OnTraceEnabledChangeListener
Listener that gets notified whenever tracing has been enabled/disabled.
|
Modifier and Type | Method and Description |
---|---|
void |
addWebViewAssetPath(Context context)
Adds the WebView asset path to
AssetManager . |
void |
callDrawGlFunction(Canvas canvas,
long nativeDrawGLFunctor)
Calls the function specified with the nativeDrawGLFunctor functor pointer.
|
void |
callDrawGlFunction(Canvas canvas,
long nativeDrawGLFunctor,
Runnable releasedRunnable)
Calls the function specified with the nativeDrawGLFunctor functor pointer.
|
boolean |
canInvokeDrawGlFunctor(View containerView)
Returns true if the draw GL functor can be invoked (see
invokeDrawGlFunctor(android.view.View, long, boolean) )
and false otherwise. |
void |
detachDrawGlFunctor(View containerView,
long nativeDrawGLFunctor)
Detaches the draw GL functor.
|
Application |
getApplication()
Returns the application which is embedding the WebView.
|
String |
getErrorString(Context context,
int errorCode)
Returns the error string for the given
errorCode . |
int |
getPackageId(Resources resources,
String packageName)
Returns the package id of the given
packageName . |
void |
invokeDrawGlFunctor(View containerView,
long nativeDrawGLFunctor,
boolean waitForCompletion)
Invokes the draw GL functor.
|
boolean |
isTraceTagEnabled()
Returns true if the WebView trace tag is enabled and false otherwise.
|
void |
setOnTraceEnabledChangeListener(WebViewDelegate.OnTraceEnabledChangeListener listener)
Register a callback to be invoked when tracing for the WebView component has been
enabled/disabled.
|
public void setOnTraceEnabledChangeListener(WebViewDelegate.OnTraceEnabledChangeListener listener)
public boolean isTraceTagEnabled()
public boolean canInvokeDrawGlFunctor(View containerView)
invokeDrawGlFunctor(android.view.View, long, boolean)
)
and false otherwise.public void invokeDrawGlFunctor(View containerView, long nativeDrawGLFunctor, boolean waitForCompletion)
nativeDrawGLFunctor
- the pointer to the native functor that implements
system/core/include/utils/Functor.hpublic void callDrawGlFunction(Canvas canvas, long nativeDrawGLFunctor)
canvas
- a hardware accelerated canvas (see Canvas.isHardwareAccelerated()
)nativeDrawGLFunctor
- the pointer to the native functor that implements
system/core/include/utils/Functor.hIllegalArgumentException
- if the canvas is not hardware acceleratedpublic void callDrawGlFunction(Canvas canvas, long nativeDrawGLFunctor, Runnable releasedRunnable)
canvas
- a hardware accelerated canvas (see Canvas.isHardwareAccelerated()
)nativeDrawGLFunctor
- the pointer to the native functor that implements
system/core/include/utils/Functor.hreleasedRunnable
- Called when this nativeDrawGLFunctor is no longer referenced by this
canvas, so is safe to be destroyed.IllegalArgumentException
- if the canvas is not hardware acceleratedpublic void detachDrawGlFunctor(View containerView, long nativeDrawGLFunctor)
nativeDrawGLFunctor
- the pointer to the native functor that implements
system/core/include/utils/Functor.hpublic int getPackageId(Resources resources, String packageName)
packageName
.public Application getApplication()
public String getErrorString(Context context, int errorCode)
errorCode
.public void addWebViewAssetPath(Context context)
AssetManager
.