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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.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
« no previous file with comments | « AUTHORS ('k') | content/shell/android/java/src/org/chromium/content_shell/ShellManager.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/java/src/org/chromium/content_shell/Shell.java
===================================================================
--- content/shell/android/java/src/org/chromium/content_shell/Shell.java (revision 251875)
+++ content/shell/android/java/src/org/chromium/content_shell/Shell.java (working copy)
@@ -22,6 +22,7 @@
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
import org.chromium.content.browser.ContentView;
+import org.chromium.content.browser.ContentViewClient;
import org.chromium.content.browser.ContentViewRenderView;
import org.chromium.content.browser.LoadUrlParams;
import org.chromium.ui.base.WindowAndroid;
@@ -43,6 +44,7 @@
// TODO(jrg): a mContentView.destroy() call is needed, both upstream and downstream.
private ContentView mContentView;
+ private ContentViewClient mContentViewClient;
private EditText mUrlTextView;
private ImageButton mPrevButton;
private ImageButton mNextButton;
@@ -85,10 +87,13 @@
*
* @param nativeShell The pointer to the native Shell object.
* @param window The owning window for this shell.
+ * @param client The {@link ContentViewClient} to be bound to any current or new
+ * {@link ContentViewCore}s associated with this shell.
*/
- public void initialize(long nativeShell, WindowAndroid window) {
+ public void initialize(long nativeShell, WindowAndroid window, ContentViewClient client) {
mNativeShell = nativeShell;
mWindow = window;
+ mContentViewClient = client;
}
/**
@@ -246,6 +251,7 @@
@CalledByNative
private void initFromNativeTabContents(long nativeTabContents) {
mContentView = ContentView.newInstance(getContext(), nativeTabContents, mWindow);
+ mContentView.setContentViewClient(mContentViewClient);
if (mContentView.getUrl() != null) mUrlTextView.setText(mContentView.getUrl());
((FrameLayout) findViewById(R.id.contentview_holder)).addView(mContentView,
new FrameLayout.LayoutParams(
« no previous file with comments | « AUTHORS ('k') | content/shell/android/java/src/org/chromium/content_shell/ShellManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698