Navigation transitions: Exposed "setBackgroundOpaque" to ContentViewCore

The navigation transition needs the transition page to render transparently over top the current tab, so we need to expose this call to java.

Design doc: https://docs.google.com/a/chromium.org/document/d/17jg1RRL3RI969cLwbKBIcoGDsPwqaEdBxafGNYGwiY4/edit# 
Implementation details: https://docs.google.com/a/chromium.org/document/d/1kREPtFJaeLoDKwrfmrYTD7DHCdxX1RzFBga2gNY8lyE/edit#heading=h.bng2kpmyvxq5
BUG=370696

Review URL: https://codereview.chromium.org/284413007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274587 0039d316-1c4b-4281-b951-d872f2087c98
parent ed07ee9b
...@@ -1594,6 +1594,12 @@ jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) { ...@@ -1594,6 +1594,12 @@ jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) {
web_contents_->GetRenderViewHost()); web_contents_->GetRenderViewHost());
} }
void ContentViewCoreImpl::SetBackgroundOpaque(JNIEnv* env, jobject jobj,
jboolean opaque) {
if (GetRenderWidgetHostViewAndroid())
GetRenderWidgetHostViewAndroid()->SetBackgroundOpaque(opaque);
}
void ContentViewCoreImpl::OnSmartClipDataExtracted( void ContentViewCoreImpl::OnSmartClipDataExtracted(
const base::string16& result) { const base::string16& result) {
JNIEnv* env = AttachCurrentThread(); JNIEnv* env = AttachCurrentThread();
......
...@@ -220,6 +220,8 @@ class ContentViewCoreImpl : public ContentViewCore, ...@@ -220,6 +220,8 @@ class ContentViewCoreImpl : public ContentViewCore,
jint width, jint width,
jint height); jint height);
void SetBackgroundOpaque(JNIEnv* env, jobject jobj, jboolean opaque);
jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj); jint GetCurrentRenderProcessId(JNIEnv* env, jobject obj);
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
......
...@@ -3020,6 +3020,12 @@ public class ContentViewCore ...@@ -3020,6 +3020,12 @@ public class ContentViewCore
mSmartClipDataListener = listener; mSmartClipDataListener = listener;
} }
public void setBackgroundOpaque(boolean opaque) {
if (mNativeContentViewCore != 0) {
nativeSetBackgroundOpaque(mNativeContentViewCore, opaque);
}
}
/** /**
* Offer a long press gesture to the embedding View, primarily for WebView compatibility. * Offer a long press gesture to the embedding View, primarily for WebView compatibility.
* *
...@@ -3230,4 +3236,5 @@ public class ContentViewCore ...@@ -3230,4 +3236,5 @@ public class ContentViewCore
private native void nativeExtractSmartClipData(long nativeContentViewCoreImpl, private native void nativeExtractSmartClipData(long nativeContentViewCoreImpl,
int x, int y, int w, int h); int x, int y, int w, int h);
private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl, boolean opaque);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment