summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/ash
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/ash')
-rw-r--r--chrome/browser/ui/ash/ash_init.cc11
-rw-r--r--chrome/browser/ui/ash/ash_init.h7
-rw-r--r--chrome/browser/ui/ash/ash_util.cc2
3 files changed, 15 insertions, 5 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.
diff --git a/chrome/browser/ui/ash/ash_init.h b/chrome/browser/ui/ash/ash_init.h
index 6ed1a0f..b1141bd 100644
--- a/chrome/browser/ui/ash/ash_init.h
+++ b/chrome/browser/ui/ash/ash_init.h
@@ -5,13 +5,16 @@
#ifndef CHROME_BROWSER_UI_ASH_ASH_INIT_H_
#define CHROME_BROWSER_UI_ASH_ASH_INIT_H_
+#include "ui/gfx/native_widget_types.h"
+
namespace chrome {
// Returns true if Ash should be run at startup.
bool ShouldOpenAshOnStartup();
-// Creates the Ash Shell and opens the Ash window.
-void OpenAsh();
+// Creates the Ash Shell and opens the Ash window. |remote_window| is only used
+// on windows. It provides the HWND to the remote window.
+void OpenAsh(gfx::AcceleratedWidget remote_window);
// Closes the Ash window and destroys the Ash Shell.
void CloseAsh();
diff --git a/chrome/browser/ui/ash/ash_util.cc b/chrome/browser/ui/ash/ash_util.cc
index 0b3bdcc..f2670de 100644
--- a/chrome/browser/ui/ash/ash_util.cc
+++ b/chrome/browser/ui/ash/ash_util.cc
@@ -41,7 +41,7 @@ void ToggleAshDesktop() {
return;
if (!ash::Shell::HasInstance())
- OpenAsh();
+ OpenAsh(gfx::kNullAcceleratedWidget);
else
CloseAsh();
}