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

Unified Diff: chrome/browser/ui/views/constrained_window_views.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
Index: chrome/browser/ui/views/constrained_window_views.cc
diff --git a/chrome/browser/ui/views/constrained_window_views.cc b/chrome/browser/ui/views/constrained_window_views.cc
index fb42722f824e2830678cd4e08b31260bf2409547..7dbdae0aacff8063e57cd8b52f47e2de9e9d0fc4 100644
--- a/chrome/browser/ui/views/constrained_window_views.cc
+++ b/chrome/browser/ui/views/constrained_window_views.cc
@@ -566,6 +566,11 @@ ConstrainedWindowViews::ConstrainedWindowViews(
params.native_widget = native_constrained_window_->AsNativeWidget();
params.child = true;
params.parent = wrapper->web_contents()->GetNativeView();
+#if defined(USE_AURA)
+ // In non-compact mode the window header can be transparent.
+ if (!ash::Shell::GetInstance()->IsWindowModeCompact())
+ params.transparent = true;
+#endif
Init(params);
wrapper_->constrained_window_tab_helper()->AddConstrainedDialog(this);
@@ -612,10 +617,11 @@ gfx::NativeWindow ConstrainedWindowViews::GetNativeWindow() {
views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() {
#if defined(USE_AURA)
CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(ash::switches::kAuraGoogleDialogFrames) ||
- command_line->HasSwitch(ash::switches::kAuraTranslucentFrames)) {
+ if (command_line->HasSwitch(ash::switches::kAuraGoogleDialogFrames))
+ return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
+ // In non-compact mode use fancy translucent headers.
+ if (!ash::Shell::GetInstance()->IsWindowModeCompact())
return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
- }
#endif
return new ConstrainedWindowFrameView(this);
}

Powered by Google App Engine
This is Rietveld 408576698