| Index: content/browser/android/content_view_core_impl.cc
|
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
|
| index 382db082ec38eaec66f344b737c010195ad0ca3a..b36300e3bdd0ec73f98b5f34c60db3af25d0b8f2 100644
|
| --- a/content/browser/android/content_view_core_impl.cc
|
| +++ b/content/browser/android/content_view_core_impl.cc
|
| @@ -1849,6 +1849,26 @@ void ContentViewCoreImpl::WebContentsDestroyed(WebContents* web_contents) {
|
| wcva->SetContentViewCore(NULL);
|
| }
|
|
|
| +
|
| +jboolean ContentViewCoreImpl::CanLockContent(JNIEnv* env, jobject obj) {
|
| + RenderWidgetHostViewAndroid* rwhva = GetRenderWidgetHostViewAndroid();
|
| + if (!rwhva || !rwhva->IsSurfaceAvailableForCopy() || !rwhva->IsShowing())
|
| + return false;
|
| + return true;
|
| +}
|
| +
|
| +void ContentViewCoreImpl::LockContent(JNIEnv* env, jobject obj) {
|
| + RenderWidgetHostViewAndroid* rwhva = GetRenderWidgetHostViewAndroid();
|
| + if (rwhva)
|
| + rwhva->LockResources();
|
| +}
|
| +
|
| +void ContentViewCoreImpl::UnlockContent(JNIEnv* env, jobject obj) {
|
| + RenderWidgetHostViewAndroid* rwhva = GetRenderWidgetHostViewAndroid();
|
| + if (rwhva)
|
| + rwhva->UnlockResources();
|
| +}
|
| +
|
| // This is called for each ContentView.
|
| jlong Init(JNIEnv* env,
|
| jobject obj,
|
|
|