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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 | « no previous file | ui/aura/aura.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 60c16e7fe24f28f5aa15e0fcda9364ef8d40fb9c..e20647f487c015d7e45a0e76a8818a39710110fc 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -214,8 +214,20 @@ void ChromeViewsDelegate::OnBeforeWidgetInit(
default:
NOTREACHED();
}
+#if defined(OS_WIN) && defined(USE_AURA)
+ } else if (chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH &&
+ params->parent &&
+ (params->type == views::Widget::InitParams::TYPE_CONTROL ||
+ params->type == views::Widget::InitParams::TYPE_WINDOW)) {
+ // On Aura Desktop, we want most windows (popups, bubbles, regular top
+ // level windows) not to be handled in this function. They'll get a
+ // DesktopNativeWidgetAura created. For controls, and child windows (e.g.
+ // modal dialogs) we want to create a NativeWidgetAura, which will be
+ // inside the parent.
+#else
} else if (params->parent &&
params->type != views::Widget::InitParams::TYPE_MENU) {
+#endif
params->native_widget = new views::NativeWidgetAura(delegate);
} else if (params->type != views::Widget::InitParams::TYPE_TOOLTIP) {
// TODO(erg): Once we've threaded context to everywhere that needs it, we
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698