summaryrefslogtreecommitdiffstats
path: root/ui/aura_shell
diff options
context:
space:
mode:
Diffstat (limited to 'ui/aura_shell')
-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
4 files changed, 11 insertions, 8 deletions
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);