Index: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java |
diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java |
index d7a2eb57c189d9d68e615a0c003a519ed22c02ec..5c40213e083cc6e1c97c51fc1552af465a412a32 100644 |
--- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java |
+++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java |
@@ -28,6 +28,7 @@ import org.chromium.content_public.browser.WebContents; |
import org.chromium.content_shell.Shell; |
import org.chromium.content_shell.ShellManager; |
import org.chromium.ui.base.ActivityWindowAndroid; |
+import org.chromium.ui.base.ViewRoot; |
/** |
* Activity for managing the Content Shell. |
@@ -41,6 +42,7 @@ public class ContentShellActivity extends Activity { |
private ShellManager mShellManager; |
private ActivityWindowAndroid mWindowAndroid; |
+ private ViewRoot mViewRoot; |
private Intent mLastSentIntent; |
private String mStartupUrl; |
@@ -76,7 +78,8 @@ public class ContentShellActivity extends Activity { |
final boolean listenToActivityState = true; |
mWindowAndroid = new ActivityWindowAndroid(this, listenToActivityState); |
mWindowAndroid.restoreInstanceState(savedInstanceState); |
- mShellManager.setWindow(mWindowAndroid); |
+ mViewRoot = ViewRoot.create(mWindowAndroid); |
+ mShellManager.setViewRoot(mViewRoot); |
// Set up the animation placeholder to be the SurfaceView. This disables the |
// SurfaceView's 'hole' clipping during animations that are notified to the window. |
mWindowAndroid.setAnimationPlaceholderView( |
@@ -214,6 +217,8 @@ public class ContentShellActivity extends Activity { |
@Override |
protected void onDestroy() { |
if (mShellManager != null) mShellManager.destroy(); |
+ mViewRoot.destroy(); |
+ mWindowAndroid.destroy(); |
super.onDestroy(); |
} |