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

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

Issue 26753005: Adding compositor callbacks to RenderWidgetHostViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumb compositor provider through instead of compositor 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/ContentView.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentView.java b/content/public/android/java/src/org/chromium/content/browser/ContentView.java
index dacfcbb07c17bafb5d810ecd8fbe1d695dd2f269..01d1033db0db7a03d4a6f413b4bcb1b02b3712e8 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentView.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentView.java
@@ -51,8 +51,8 @@ public class ContentView extends FrameLayout
* @return A ContentView instance.
*/
public static ContentView newInstance(Context context, int nativeWebContents,
- WindowAndroid windowAndroid) {
- return newInstance(context, nativeWebContents, windowAndroid, null,
+ WindowAndroid windowAndroid, CompositorProvider compositorProvider) {
+ return newInstance(context, nativeWebContents, windowAndroid, compositorProvider, null,
android.R.attr.webViewStyle);
}
@@ -66,10 +66,11 @@ public class ContentView extends FrameLayout
* @return A ContentView instance.
*/
public static ContentView newInstance(Context context, int nativeWebContents,
- WindowAndroid windowAndroid, AttributeSet attrs) {
+ WindowAndroid windowAndroid, CompositorProvider compositorProvider,
+ AttributeSet attrs) {
// TODO(klobag): use the WebViewStyle as the default style for now. It enables scrollbar.
// When ContentView is moved to framework, we can define its own style in the res.
- return newInstance(context, nativeWebContents, windowAndroid, attrs,
+ return newInstance(context, nativeWebContents, windowAndroid, compositorProvider, attrs,
android.R.attr.webViewStyle);
}
@@ -84,17 +85,19 @@ public class ContentView extends FrameLayout
* @return A ContentView instance.
*/
public static ContentView newInstance(Context context, int nativeWebContents,
- WindowAndroid windowAndroid, AttributeSet attrs, int defStyle) {
+ WindowAndroid windowAndroid, CompositorProvider compositorProvider, AttributeSet attrs,
+ int defStyle) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
- return new ContentView(context, nativeWebContents, windowAndroid, attrs, defStyle);
+ return new ContentView(context, nativeWebContents, windowAndroid, compositorProvider,
+ attrs, defStyle);
} else {
- return new JellyBeanContentView(context, nativeWebContents, windowAndroid, attrs,
- defStyle);
+ return new JellyBeanContentView(context, nativeWebContents, windowAndroid,
+ compositorProvider, attrs, defStyle);
}
}
protected ContentView(Context context, int nativeWebContents, WindowAndroid windowAndroid,
- AttributeSet attrs, int defStyle) {
+ CompositorProvider compositorProvider, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
if (getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) {
@@ -107,6 +110,7 @@ public class ContentView extends FrameLayout
mContentViewCore = new ContentViewCore(context);
mContentViewCore.initialize(this, this, nativeWebContents, windowAndroid,
+ compositorProvider,
Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN ?
ContentViewCore.INPUT_EVENTS_DELIVERED_AT_VSYNC :
ContentViewCore.INPUT_EVENTS_DELIVERED_IMMEDIATELY);

Powered by Google App Engine
This is Rietveld 408576698