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

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

Issue 9618022: Ash: Use translucent frames by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/window.cc
diff --git a/chrome/browser/ui/views/window.cc b/chrome/browser/ui/views/window.cc
index d3b0e561b988163014121d08bc3a7c7a9af70c4c..a50add801b964ff5c3ae29197870343f74f91e55 100644
--- a/chrome/browser/ui/views/window.cc
+++ b/chrome/browser/ui/views/window.cc
@@ -33,6 +33,27 @@
// The remainder of the code here is dealing with the legacy CrOS WM and
// can also be removed.
+namespace {
+
+views::Widget* CreateViewsWindowWithParent(gfx::NativeWindow parent,
+ views::WidgetDelegate* delegate) {
+ views::Widget* widget = new views::Widget;
+ views::Widget::InitParams params;
+ params.delegate = delegate;
+#if defined(OS_WIN) || defined(USE_AURA)
+ params.parent = parent;
+#endif
+#if defined(USE_AURA)
+ // Outside of compact mode, dialog windows may have translucent frames.
Ben Goodger (Google) 2012/03/06 21:14:19 Can you add a TODO to find a better way to set thi
James Cook 2012/03/06 21:48:16 Done.
+ if (!ash::Shell::GetInstance()->IsWindowModeCompact())
+ params.transparent = true;
+#endif
+ widget->Init(params);
+ return widget;
+}
+
+} // namespace
+
namespace browser {
views::Widget* CreateViewsWindow(gfx::NativeWindow parent,
@@ -41,7 +62,7 @@ views::Widget* CreateViewsWindow(gfx::NativeWindow parent,
#if defined(OS_CHROMEOS) && !defined(USE_AURA)
return chromeos::BubbleWindow::Create(parent, style, delegate);
#else
- return views::Widget::CreateWindowWithParent(delegate, parent);
+ return CreateViewsWindowWithParent(parent, delegate);
#endif
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698