Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1983)

Unified Diff: ui/aura_shell/shell.cc

Issue 8417008: aura: Add fullscreen/popups to RenderWidgetHostViewAura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use unknown type for unhandled in NativeWidgetAura Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698