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 3aba276bf6e1efd186202d30ce3301edbcb49762..f4bb2d6c9a0b3d4a389e5a2cb254b87275cc16d0 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 |
@@ -14,6 +14,7 @@ import android.widget.FrameLayout; |
import org.chromium.base.CalledByNative; |
import org.chromium.base.JNINamespace; |
+import org.chromium.ui.gfx.NativeWindow; |
/** |
* Container and generator of ShellViews. |
@@ -21,6 +22,7 @@ import org.chromium.base.JNINamespace; |
@JNINamespace("content") |
public class ShellManager extends FrameLayout { |
+ private NativeWindow mWindow; |
private Shell mActiveShell; |
private String mStartupUrl = ContentShellActivity.DEFAULT_SHELL_URL; |
@@ -56,6 +58,13 @@ public class ShellManager extends FrameLayout { |
} |
/** |
+ * @param window The window used to generate all shells. |
+ */ |
+ public void setWindow(NativeWindow window) { |
+ mWindow = window; |
+ } |
+ |
+ /** |
* Sets the startup URL for new shell windows. |
*/ |
public void setStartupUrl(String url) { |
@@ -84,6 +93,7 @@ public class ShellManager extends FrameLayout { |
(LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
Shell shellView = (Shell) inflater.inflate(R.layout.shell_view, null); |
shellView.setSurfaceView(mSurfaceView); |
+ shellView.setWindow(mWindow); |
removeAllViews(); |
if (mActiveShell != null && mActiveShell.getContentView() != null) { |