| Index: content/shell/android/java/src/org/chromium/content_shell/Shell.java
|
| diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
|
| index e2f82e34584bb68430d33a6a1396760ae116293b..13b29ab4f02e6abff3e1589a600b864e32338e3d 100644
|
| --- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java
|
| +++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
|
| @@ -37,6 +37,7 @@ import org.chromium.content_public.browser.LoadUrlParams;
|
| import org.chromium.content_public.browser.NavigationController;
|
| import org.chromium.content_public.browser.WebContents;
|
| import org.chromium.ui.base.ViewAndroidDelegate;
|
| +import org.chromium.ui.base.ViewRoot;
|
| import org.chromium.ui.base.WindowAndroid;
|
|
|
| /**
|
| @@ -56,6 +57,7 @@ public class Shell extends LinearLayout {
|
|
|
| private ContentViewCore mContentViewCore;
|
| private WebContents mWebContents;
|
| + private ViewRoot mViewRoot;
|
| private NavigationController mNavigationController;
|
| private ContentViewClient mContentViewClient;
|
| private EditText mUrlTextView;
|
| @@ -295,9 +297,10 @@ public class Shell extends LinearLayout {
|
| private void initFromNativeTabContents(WebContents webContents) {
|
| Context context = getContext();
|
| mContentViewCore = new ContentViewCore(context, "");
|
| + mViewRoot = ViewRoot.create(mWindow);
|
| ContentView cv = ContentView.createContentView(context, mContentViewCore);
|
| mContentViewCore.initialize(ViewAndroidDelegate.createBasicDelegate(cv), cv,
|
| - webContents, mWindow);
|
| + webContents, mWindow, mViewRoot);
|
| mContentViewCore.setActionModeCallback(defaultActionCallback());
|
| mContentViewCore.setContentViewClient(mContentViewClient);
|
| mWebContents = mContentViewCore.getWebContents();
|
| @@ -311,7 +314,7 @@ public class Shell extends LinearLayout {
|
| FrameLayout.LayoutParams.MATCH_PARENT,
|
| FrameLayout.LayoutParams.MATCH_PARENT));
|
| cv.requestFocus();
|
| - mContentViewRenderView.setCurrentContentViewCore(mContentViewCore);
|
| + mContentViewRenderView.setCurrentContent(mContentViewCore, mViewRoot);
|
| }
|
|
|
| /**
|
| @@ -364,6 +367,13 @@ public class Shell extends LinearLayout {
|
| }
|
|
|
| /**
|
| + * @return {@link ViewRoot} instance used to forward view/input events.
|
| + */
|
| + ViewRoot getViewRoot() {
|
| + return mViewRoot;
|
| + }
|
| +
|
| + /**
|
| * Enable/Disable navigation(Prev/Next) button if navigation is allowed/disallowed
|
| * in respective direction.
|
| * @param controlId Id of button to update
|
|
|