diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index 7aa79eefc5427..650285d2fb8d1 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -1332,6 +1332,11 @@ jint ContentViewCoreImpl::GetCurrentRenderProcessId(JNIEnv* env, jobject obj) { web_contents_->GetRenderViewHost()); } +void ContentViewCoreImpl::SetBackgroundColor(JNIEnv* env, jobject jobj, + jint color) { + root_layer_->SetBackgroundColor(color); +} + void ContentViewCoreImpl::SetBackgroundOpaque(JNIEnv* env, jobject jobj, jboolean opaque) { if (GetRenderWidgetHostViewAndroid()) { 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 7b1e4115832a5..f9b447c86ba02 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 @@ -3256,6 +3256,12 @@ public void setSmartClipDataListener(SmartClipDataListener listener) { mSmartClipDataListener = listener; } + public void setBackgroundColor(int color) { + if (mNativeContentViewCore != 0) { + nativeSetBackgroundColor(mNativeContentViewCore, color); + } + } + public void setBackgroundOpaque(boolean opaque) { if (mNativeContentViewCore != 0) { nativeSetBackgroundOpaque(mNativeContentViewCore, opaque); @@ -3470,5 +3476,7 @@ private native void nativeSetTextTrackSettings(long nativeContentViewCoreImpl, private native void nativeExtractSmartClipData(long nativeContentViewCoreImpl, int x, int y, int w, int h); + private native void nativeSetBackgroundColor(long nativeContentViewCoreImpl, int color); + private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl, boolean opaque); }