summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/ash/ash_init.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 18:32:23 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 18:32:23 +0000
commit1b4c747749bc8cc46ed2b9006d2f82b6c511e7c4 (patch)
treedadc320dc0f37c5dd756aaee193a72b8697c09b8 /chrome/browser/ui/ash/ash_init.cc
parent9eab79b4434f1f4346767257af80f066116706f5 (diff)
downloadchromium_src-1b4c747749bc8cc46ed2b9006d2f82b6c511e7c4.zip
chromium_src-1b4c747749bc8cc46ed2b9006d2f82b6c511e7c4.tar.gz
chromium_src-1b4c747749bc8cc46ed2b9006d2f82b6c511e7c4.tar.bz2
Makes construction of (ash)RemoteWindowTreeHostWin explicit
I need to do this as I need to pass in state to the constructor and I can't do that with lazy construction. This makes creation a little saner anyway. I'm not happy about the static setting the HWND. I'll see if I can clean that up later. BUG=none TEST=none R=ananta@chromium.org Review URL: https://codereview.chromium.org/277753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/ash/ash_init.cc')
-rw-r--r--chrome/browser/ui/ash/ash_init.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
index c3a8b51..06ab94e 100644
--- a/chrome/browser/ui/ash/ash_init.cc
+++ b/chrome/browser/ui/ash/ash_init.cc
@@ -11,6 +11,7 @@
#include "ash/magnifier/magnification_controller.h"
#include "ash/magnifier/partial_magnification_controller.h"
#include "ash/shell.h"
+#include "ash/shell_init_params.h"
#include "base/command_line.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/lifetime/application_lifetime.h"
@@ -42,7 +43,7 @@ bool ShouldOpenAshOnStartup() {
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh);
}
-void OpenAsh() {
+void OpenAsh(gfx::AcceleratedWidget remote_window) {
#if defined(OS_CHROMEOS)
#if defined(USE_X11)
if (base::SysInfo::IsRunningOnChromeOS()) {
@@ -58,8 +59,14 @@ void OpenAsh() {
ash::Shell::set_initially_hide_cursor(true);
#endif
+ ash::ShellInitParams shell_init_params;
// Shell takes ownership of ChromeShellDelegate.
- ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate);
+ shell_init_params.delegate = new ChromeShellDelegate;
+#if defined(OS_WIN)
+ shell_init_params.remote_hwnd = remote_window;
+#endif
+
+ ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params);
shell->accelerator_controller()->SetScreenshotDelegate(
scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass());
// TODO(flackr): Investigate exposing a blocking pool task runner to chromeos.