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

Unified Diff: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java

Issue 2595263002: Introduce ViewRoot forwarding input/view events to native (Closed)
Patch Set: unittest Created 3 years, 11 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 | « content/shell/android/java/src/org/chromium/content_shell/ShellManager.java ('k') | ui/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b886489479155ce91996667aecb24202b040d6a7..8fae414ba42f707fb42f48dcf94e4b16670c7b91 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;
@@ -75,8 +77,9 @@ public class ContentShellActivity extends Activity {
mShellManager = (ShellManager) findViewById(R.id.shell_container);
final boolean listenToActivityState = true;
mWindowAndroid = new ActivityWindowAndroid(this, listenToActivityState);
+ mViewRoot = ViewRoot.create(mWindowAndroid);
mWindowAndroid.restoreInstanceState(savedInstanceState);
- mShellManager.setWindow(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();
+ mWindowAndroid.destroy();
+ mViewRoot.destroy();
super.onDestroy();
}
« no previous file with comments | « content/shell/android/java/src/org/chromium/content_shell/ShellManager.java ('k') | ui/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698