summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/android/java/src/org/chromium/content_shell/ShellManager.java18
1 files changed, 10 insertions, 8 deletions
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 a7e3037..c112ede 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,15 @@ 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) {
+ assert window != null;
+ mWindow = window;
+ mContentViewRenderView = new ContentViewRenderView(getContext(), window) {
@Override
protected void onReadyToRender() {
if (sStartup) {
@@ -49,13 +57,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 +88,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);