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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java

Issue 172043002: Fix a crash of the Content Shell for Android when showing videos in a ContentVideoView. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 10 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/shell/android/java/src/org/chromium/content_shell/ShellManager.java
===================================================================
--- content/shell/android/java/src/org/chromium/content_shell/ShellManager.java (revision 251875)
+++ content/shell/android/java/src/org/chromium/content_shell/ShellManager.java (working copy)
@@ -13,6 +13,7 @@
import org.chromium.base.JNINamespace;
import org.chromium.base.ThreadUtils;
import org.chromium.content.browser.ContentView;
+import org.chromium.content.browser.ContentViewClient;
import org.chromium.content.browser.ContentViewRenderView;
import org.chromium.ui.base.WindowAndroid;
@@ -31,6 +32,7 @@
// The target for all content rendering.
private ContentViewRenderView mContentViewRenderView;
+ private ContentViewClient mContentViewClient;
/**
* Constructor for inflating via XML.
@@ -98,6 +100,10 @@
mContentViewRenderView.setOverlayVideoMode(enabled);
}
+ public void setContentViewClient(ContentViewClient client) {
Ted C 2014/02/20 00:54:08 I would just have ShellManager build the ContentVi
+ mContentViewClient = client;
+ }
+
@SuppressWarnings("unused")
@CalledByNative
private Object createShell(long nativeShellPtr) {
@@ -106,6 +112,7 @@
(LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
Shell shellView = (Shell) inflater.inflate(R.layout.shell_view, null);
shellView.initialize(nativeShellPtr, mWindow);
+ shellView.setContentViewClient(mContentViewClient);
Ted C 2014/02/20 00:54:08 just pass this param with initialize above.
// TODO(tedchoc): Allow switching back to these inactive shells.
if (mActiveShell != null) removeShell(mActiveShell);

Powered by Google App Engine
This is Rietveld 408576698