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

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: merge 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
« no previous file with comments | « ui/aura_shell/default_container_layout_manager_unittest.cc ('k') | ui/gfx/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/shell.cc
diff --git a/ui/aura_shell/shell.cc b/ui/aura_shell/shell.cc
index b0fe26069fae32736f43cedcd1e3b94ca1decadb..872ea6164f4ec8bee90b2a550c0f75b39764b552 100644
--- a/ui/aura_shell/shell.cc
+++ b/ui/aura_shell/shell.cc
@@ -155,22 +155,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);
« no previous file with comments | « ui/aura_shell/default_container_layout_manager_unittest.cc ('k') | ui/gfx/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698