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

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: Change RWHVA to add itself to the compositor as per sievers@ comment Created 7 years, 2 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
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 76a6083057216dc72d498aa89f21a097d85c007e..77deab6d4bc938cc1d1c98a930289c28014b864a 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
@@ -172,6 +172,14 @@ public class ContentViewRenderView extends FrameLayout {
*/
public void setCurrentContentView(ContentView contentView) {
assert mNativeContentViewRenderView != 0;
+
+ if (mCurrentContentView != contentView) {
+ ContentViewCore oldContentViewCore =
+ contentView != null ? mCurrentContentView.getContentViewCore() : null;
jdduke (slow) 2013/10/16 23:12:26 Do you mean "mCurrentContentView != null"?
powei 2013/10/19 00:05:18 Done. Removed.
+ nativeRemovePreviousContentView(mNativeContentViewRenderView,
+ oldContentViewCore != null ? oldContentViewCore.getNativeContentViewCore() : 0);
+ }
+
mCurrentContentView = contentView;
ContentViewCore contentViewCore =
@@ -281,6 +289,8 @@ public class ContentViewRenderView extends FrameLayout {
private native void nativeDestroy(int nativeContentViewRenderView);
private native void nativeSetCurrentContentView(int nativeContentViewRenderView,
int nativeContentView);
+ private native void nativeRemovePreviousContentView(int nativeContentViewRenderView,
+ int nativeContentView);
private native void nativeSurfaceCreated(int nativeContentViewRenderView, Surface surface);
private native void nativeSurfaceDestroyed(int nativeContentViewRenderView);
private native void nativeSurfaceSetSize(int nativeContentViewRenderView,

Powered by Google App Engine
This is Rietveld 408576698