summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-10 18:05:45 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-10 18:05:45 +0000
commit87cc0849f5f0e8c4227f848d7a16f65b8674bd16 (patch)
tree6af8ffe4e5b8bd3efc73c79e966917584d5b6708
parentf74a757b6512c70b53faf44e4b3b5b887d41f7c0 (diff)
downloadchromium_src-87cc0849f5f0e8c4227f848d7a16f65b8674bd16.zip
chromium_src-87cc0849f5f0e8c4227f848d7a16f65b8674bd16.tar.gz
chromium_src-87cc0849f5f0e8c4227f848d7a16f65b8674bd16.tar.bz2
touchui + aura: Move the keyboard in the front-most container.
BUG=none TEST=none Review URL: http://codereview.chromium.org/8216002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104748 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc9
-rw-r--r--ui/aura_shell/desktop_window.cc10
-rw-r--r--ui/aura_shell/examples/lock_view.cc3
-rw-r--r--ui/aura_shell/launcher/launcher_view.cc3
-rw-r--r--ui/aura_shell/status_area_view.cc3
5 files changed, 20 insertions, 8 deletions
diff --git a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
index 4a0afa5..eb3e9af 100644
--- a/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
+++ b/chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc
@@ -36,6 +36,11 @@
#include "chrome/browser/chromeos/input_method/virtual_keyboard_selector.h"
#endif
+#if defined(USE_AURA)
+#include "ui/aura_shell/shell.h"
+#include "ui/aura_shell/shell_window_ids.h"
+#endif
+
namespace {
const int kDefaultKeyboardHeight = 300;
@@ -166,6 +171,10 @@ KeyboardWidget::KeyboardWidget()
params.keep_on_top = true;
params.transparent = true;
params.bounds = GetKeyboardPosition(keyboard_height_);
+#if defined(USE_AURA)
+ params.parent = aura_shell::Shell::GetInstance()->GetContainer(
+ aura_shell::internal::kShellWindowId_MenusAndTooltipsContainer);
+#endif
Init(params);
// Setup the DOM view to host the keyboard.
diff --git a/ui/aura_shell/desktop_window.cc b/ui/aura_shell/desktop_window.cc
index 616ba28..5a5113b 100644
--- a/ui/aura_shell/desktop_window.cc
+++ b/ui/aura_shell/desktop_window.cc
@@ -6,6 +6,7 @@
#include "ui/aura/toplevel_window_container.h"
#include "ui/aura/window.h"
#include "ui/aura_shell/desktop_layout_manager.h"
+#include "ui/aura_shell/shell.h"
#include "ui/aura_shell/shell_factory.h"
#include "ui/aura_shell/shell_window_ids.h"
#include "views/widget/widget.h"
@@ -59,19 +60,18 @@ void InitDesktopWindow() {
new internal::DesktopLayoutManager(root_window);
root_window->SetLayoutManager(desktop_layout);
+ Shell* shell = Shell::GetInstance();
views::Widget* desktop_background = internal::CreateDesktopBackground();
- aura::Desktop::GetInstance()->window()->GetChildById(
+ shell->GetContainer(
internal::kShellWindowId_DesktopBackgroundContainer)->AddChild(
desktop_background->GetNativeView());
views::Widget* launcher = internal::CreateLauncher();
- aura::Desktop::GetInstance()->window()->GetChildById(
- internal::kShellWindowId_LauncherContainer)->AddChild(
+ shell->GetContainer(internal::kShellWindowId_LauncherContainer)->AddChild(
launcher->GetNativeView());
views::Widget* status_area = internal::CreateStatusArea();
- aura::Desktop::GetInstance()->window()->GetChildById(
- internal::kShellWindowId_StatusContainer)->AddChild(
+ shell->GetContainer(internal::kShellWindowId_StatusContainer)->AddChild(
status_area->GetNativeView());
desktop_layout->set_background_widget(desktop_background);
diff --git a/ui/aura_shell/examples/lock_view.cc b/ui/aura_shell/examples/lock_view.cc
index 90552e3..19360e1 100644
--- a/ui/aura_shell/examples/lock_view.cc
+++ b/ui/aura_shell/examples/lock_view.cc
@@ -6,6 +6,7 @@
#include "ui/aura/desktop.h"
#include "ui/aura/window.h"
#include "ui/aura_shell/examples/example_factory.h"
+#include "ui/aura_shell/shell.h"
#include "ui/aura_shell/shell_window_ids.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
@@ -59,7 +60,7 @@ void CreateLock() {
(desktop_bounds.height() - ps.height()) / 2,
ps.width(), ps.height());
params.delegate = lock_view;
- params.parent = aura::Desktop::GetInstance()->window()->GetChildById(
+ params.parent = Shell::GetInstance()->GetContainer(
aura_shell::internal::kShellWindowId_LockScreenContainer);
widget->Init(params);
widget->SetContentsView(lock_view);
diff --git a/ui/aura_shell/launcher/launcher_view.cc b/ui/aura_shell/launcher/launcher_view.cc
index c685ae1..f62afcc 100644
--- a/ui/aura_shell/launcher/launcher_view.cc
+++ b/ui/aura_shell/launcher/launcher_view.cc
@@ -8,6 +8,7 @@
#include "ui/aura/desktop.h"
#include "ui/aura_shell/aura_shell_export.h"
#include "ui/aura_shell/launcher/launcher_button.h"
+#include "ui/aura_shell/shell.h"
#include "ui/aura_shell/shell_window_ids.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/compositor/layer.h"
@@ -41,7 +42,7 @@ views::Widget* CreateLauncher() {
views::Widget* launcher_widget = new views::Widget;
views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
params.bounds = gfx::Rect(0, 0, 300, 64);
- params.parent = aura::Desktop::GetInstance()->window()->GetChildById(
+ params.parent = Shell::GetInstance()->GetContainer(
aura_shell::internal::kShellWindowId_LauncherContainer);
LauncherView* launcher_view = new LauncherView;
params.delegate = launcher_view;
diff --git a/ui/aura_shell/status_area_view.cc b/ui/aura_shell/status_area_view.cc
index c4cea33..fad8d04 100644
--- a/ui/aura_shell/status_area_view.cc
+++ b/ui/aura_shell/status_area_view.cc
@@ -8,6 +8,7 @@
#include "grit/ui_resources.h"
#include "ui/aura/desktop.h"
#include "ui/aura_shell/aura_shell_export.h"
+#include "ui/aura_shell/shell.h"
#include "ui/aura_shell/shell_window_ids.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
@@ -37,7 +38,7 @@ views::Widget* CreateStatusArea() {
views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
gfx::Size ps = status_area_view->GetPreferredSize();
params.bounds = gfx::Rect(0, 0, ps.width(), ps.height());
- params.parent = aura::Desktop::GetInstance()->window()->GetChildById(
+ params.parent = Shell::GetInstance()->GetContainer(
aura_shell::internal::kShellWindowId_StatusContainer);
params.delegate = status_area_view;
widget->Init(params);