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

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

Issue 26753005: Adding compositor callbacks to RenderWidgetHostViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 7 years, 1 month 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
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
index 3c7f70bbfed632537eb6bbe7851df3f8718ac582..211c640622d6bab00279f497bdd8521ec6fd1e20 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
@@ -18,6 +18,7 @@ import android.widget.FrameLayout;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
import org.chromium.content.common.TraceEvent;
+import org.chromium.ui.WindowAndroid;
/***
* This view is used by a ContentView to render its content.
@@ -53,10 +54,10 @@ public class ContentViewRenderView extends FrameLayout {
* Native code should add/remove the layers to be rendered through the ContentViewLayerRenderer.
* @param context The context used to create this.
*/
- public ContentViewRenderView(Context context) {
+ public ContentViewRenderView(Context context, WindowAndroid rootWindow) {
super(context);
-
- mNativeContentViewRenderView = nativeInit();
+ assert rootWindow != null;
+ mNativeContentViewRenderView = nativeInit(rootWindow.getNativePointer());
assert mNativeContentViewRenderView != 0;
setBackgroundColor(Color.WHITE);
@@ -290,7 +291,7 @@ public class ContentViewRenderView extends FrameLayout {
}
}
- private native int nativeInit();
+ private native int nativeInit(long nativeRootWindow);
private native void nativeDestroy(int nativeContentViewRenderView);
private native void nativeSetCurrentContentView(int nativeContentViewRenderView,
int nativeContentView);

Powered by Google App Engine
This is Rietveld 408576698