Index: ui/aura_shell/shell.cc |
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc |
index cac3fe826ad33adfa083ab81a7356d14d626e8e0..43f55256bc6d82b56ccbdbefffcd7c90230dacd5 100644 |
--- a/ui/aura_shell/shell.cc |
+++ b/ui/aura_shell/shell.cc |
@@ -103,7 +103,8 @@ void Shell::Init() { |
CreateSpecialContainers(&containers); |
aura::Window::Windows::const_iterator i; |
for (i = containers.begin(); i != containers.end(); ++i) { |
- (*i)->Init(ui::Layer::LAYER_HAS_NO_TEXTURE); |
+ (*i)->Init(ui::Layer::LAYER_HAS_NO_TEXTURE, |
+ aura::Window::LAYER_INITIALLY_INVISIBLE); |
desktop_window->AddChild(*i); |
(*i)->Show(); |
} |
@@ -158,22 +159,18 @@ void Shell::ToggleOverview() { |
void Shell::AddChildToDefaultParent(aura::Window* window) { |
aura::Window* parent = NULL; |
- intptr_t type = reinterpret_cast<intptr_t>( |
- ui::ViewProp::GetValue(window, views::NativeWidgetAura::kWindowTypeKey)); |
- switch (static_cast<Widget::InitParams::Type>(type)) { |
- case Widget::InitParams::TYPE_WINDOW: |
- case Widget::InitParams::TYPE_WINDOW_FRAMELESS: |
- case Widget::InitParams::TYPE_CONTROL: |
- case Widget::InitParams::TYPE_BUBBLE: |
- case Widget::InitParams::TYPE_POPUP: |
+ switch (window->type()) { |
+ case aura::WINDOW_TYPE_NORMAL: |
+ case aura::WINDOW_TYPE_POPUP: |
parent = GetContainer(internal::kShellWindowId_DefaultContainer); |
break; |
- case Widget::InitParams::TYPE_MENU: |
- case Widget::InitParams::TYPE_TOOLTIP: |
+ case aura::WINDOW_TYPE_MENU: |
+ case aura::WINDOW_TYPE_TOOLTIP: |
parent = GetContainer(internal::kShellWindowId_MenusAndTooltipsContainer); |
break; |
default: |
- // This will crash for controls, since they can't be parented to anything. |
+ NOTREACHED() << "Window " << window->id() |
+ << " has unhandled type " << window->type(); |
break; |
} |
parent->AddChild(window); |