| 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..b9ea81bd609cacc4232095d9ee79432c52124963 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;
|
| @@ -301,6 +303,8 @@ public class Shell extends LinearLayout {
|
| mContentViewCore.setActionModeCallback(defaultActionCallback());
|
| mContentViewCore.setContentViewClient(mContentViewClient);
|
| mWebContents = mContentViewCore.getWebContents();
|
| + mViewRoot = ViewRoot.create(mWindow);
|
| + mWebContents.initViewRoot(mViewRoot);
|
| mNavigationController = mWebContents.getNavigationController();
|
| if (getParent() != null) mContentViewCore.onShow();
|
| if (mWebContents.getUrl() != null) {
|
| @@ -311,7 +315,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 +368,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
|
|
|