Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 170783014: android: Expose content locks in RenderWidgetHostViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 9dea1cf20d90e39fef4c10dde07a10e3e14892b0..dd93d05e6e54dda51d2d5bb022e0252651ce1a15 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1532,6 +1532,28 @@ public class ContentViewCore
nativeOnHide(mNativeContentViewCore);
}
+ public boolean canLockContent() {
+ if (mNativeContentViewCore != 0)
+ return nativeCanLockContent(mNativeContentViewCore);
+ return false;
+ }
+
+ /**
+ * Lock the content so it cannot be destroyed while we have the lock.
+ */
+ public void lockContent() {
+ if (mNativeContentViewCore != 0)
+ nativeLockContent(mNativeContentViewCore);
+ }
+
+ /**
+ * Lock the content so it cannot be destroyed while we have the lock.
+ */
+ public void unlockContent() {
+ if (mNativeContentViewCore != 0)
+ nativeUnlockContent(mNativeContentViewCore);
+ }
+
/**
* Return the ContentSettings object used to retrieve the settings for this
* ContentViewCore. For modifications, ChromeNativePreferences is to be used.
@@ -3482,4 +3504,10 @@ public class ContentViewCore
private native void nativeExtractSmartClipData(long nativeContentViewCoreImpl,
int x, int y, int w, int h);
+
+ private native boolean nativeCanLockContent(long nativeContentViewCoreImpl);
+
+ private native void nativeLockContent(long nativeContentViewCoreImpl);
+
+ private native void nativeUnlockContent(long nativeContentViewCoreImpl);
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698