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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java

Issue 26753005: Adding compositor callbacks to RenderWidgetHostViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: host observers through WindowAndroid Created 7 years, 1 month 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
Index: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
index 2791442689fa4a7157eaeea0ad0779f4ef45fe19..bc520c2a5fd469f961f46dd0cd05fb0380567594 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/ShellManager.java
@@ -37,7 +37,14 @@ public class ShellManager extends FrameLayout {
public ShellManager(Context context, AttributeSet attrs) {
super(context, attrs);
nativeInit(this);
- mContentViewRenderView = new ContentViewRenderView(context) {
+ }
+
+ /**
+ * @param window The window used to generate all shells.
+ */
+ public void setWindow(WindowAndroid window) {
+ mWindow = window;
+ mContentViewRenderView = new ContentViewRenderView(getContext(), window) {
@Override
protected void onReadyToRender() {
if (sStartup) {
@@ -49,13 +56,6 @@ public class ShellManager extends FrameLayout {
}
/**
- * @param window The window used to generate all shells.
- */
- public void setWindow(WindowAndroid window) {
- mWindow = window;
- }
-
- /**
* @return The window used to generate all shells.
*/
public WindowAndroid getWindow() {
@@ -87,6 +87,7 @@ public class ShellManager extends FrameLayout {
@SuppressWarnings("unused")
@CalledByNative
private Object createShell() {
+ assert mContentViewRenderView != null;
LayoutInflater inflater =
(LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
Shell shellView = (Shell) inflater.inflate(R.layout.shell_view, null);

Powered by Google App Engine
This is Rietveld 408576698