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

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

Issue 13812009: Make ContentViewRenderView's SurfaceView injectable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added javadoc Created 7 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 781899daca98681801a1cdf3cb247955714899a7..c3f6c26e144aca71bab32dc5a43425d30e78bd0a 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
@@ -47,7 +47,7 @@ public class ContentViewRenderView extends FrameLayout {
mNativeContentViewRenderView = nativeInit();
assert mNativeContentViewRenderView != 0;
- mSurfaceView = new SurfaceView(getContext());
+ mSurfaceView = createSurfaceView(getContext());
mSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
@@ -119,6 +119,16 @@ public class ContentViewRenderView extends FrameLayout {
}
/**
+ * This method could be subclassed optionally to provide a custom SurfaceView object to
+ * this ContentViewRenderView.
+ * @param context The context used to create the SurfaceView object.
+ * @return The created SurfaceView object.
+ */
+ protected SurfaceView createSurfaceView(Context context) {
+ return new SurfaceView(context);
+ }
+
+ /**
* @return whether the surface view is initialized and ready to render.
*/
public boolean isInitialized() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698