Commit d6a9562f authored by gunsch's avatar gunsch Committed by Commit bot

Chromecast Android buildfix: use new ContentViewCore.initialize API.

See: https://codereview.chromium.org/831523005

R=dtrainor@chromium.org,lcwu@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/879073002

Cr-Commit-Position: refs/heads/master@{#313391}
parent 3a1c346e
...@@ -124,11 +124,11 @@ public class CastWindowAndroid extends LinearLayout { ...@@ -124,11 +124,11 @@ public class CastWindowAndroid extends LinearLayout {
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
@CalledByNative @CalledByNative
private void initFromNativeWebContents(long nativeWebContents, int renderProcessId) { private void initFromNativeWebContents(WebContents webContents, int renderProcessId) {
Context context = getContext(); Context context = getContext();
mContentViewCore = new ContentViewCore(context); mContentViewCore = new ContentViewCore(context);
ContentView view = ContentView.newInstance(context, mContentViewCore); ContentView view = ContentView.newInstance(context, mContentViewCore);
mContentViewCore.initialize(view, view, nativeWebContents, mWindow); mContentViewCore.initialize(view, view, webContents, mWindow);
mWebContents = mContentViewCore.getWebContents(); mWebContents = mContentViewCore.getWebContents();
mNavigationController = mWebContents.getNavigationController(); mNavigationController = mWebContents.getNavigationController();
mRenderProcessId = renderProcessId; mRenderProcessId = renderProcessId;
......
...@@ -69,7 +69,7 @@ CastWindowAndroid* CastWindowAndroid::CreateCastWindowAndroid( ...@@ -69,7 +69,7 @@ CastWindowAndroid* CastWindowAndroid::CreateCastWindowAndroid(
web_contents->SetDelegate(shell); web_contents->SetDelegate(shell);
Java_CastWindowAndroid_initFromNativeWebContents( Java_CastWindowAndroid_initFromNativeWebContents(
env, shell->java_object_.obj(), reinterpret_cast<jint>(web_contents), env, shell->java_object_.obj(), web_contents->GetJavaWebContents().obj(),
web_contents->GetRenderProcessHost()->GetID()); web_contents->GetRenderProcessHost()->GetID());
// Enabling hole-punching also requires runtime renderer preference // Enabling hole-punching also requires runtime renderer preference
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment