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

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

Issue 108193005: Fixing opacity for browser frame window on ASH/Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review changes. Created 7 years 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/chrome_views_delegate_aura.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate_aura.cc b/chrome/browser/ui/views/chrome_views_delegate_aura.cc
new file mode 100644
index 0000000000000000000000000000000000000000..776887a4fc5863dae4bbb995947133c7ae45e51b
--- /dev/null
+++ b/chrome/browser/ui/views/chrome_views_delegate_aura.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/chrome_views_delegate.h"
+
+#include "chrome/browser/ui/ash/ash_util.h"
+
+views::Widget::InitParams::WindowOpacity
+ChromeViewsDelegate::GetOpacityForInitParams(
+ const views::Widget::InitParams& params) {
+ if (params.type != views::Widget::InitParams::TYPE_WINDOW &&
sky 2013/12/17 19:14:23 This is the same everywhere, right? Can't we move
Shrikant Kelkar 2013/12/17 22:43:34 Yes we can move back, but then opacity determinati
sky 2013/12/17 22:58:55 Why would it be wrong to centralize the exact same
Shrikant Kelkar 2013/12/17 23:33:29 Done.
+ params.type != views::Widget::InitParams::TYPE_PANEL)
+ return views::Widget::InitParams::OPAQUE_WINDOW;
+
+ // We want translucent windows when either we are in ASH or we are
+ // a top level window which is not of type TYPE_WINDOW.
+ if ((params.context && chrome::IsNativeViewInAsh(params.context)) ||
+ (params.top_level && params.type !=
sky 2013/12/17 19:14:23 params.top_level isn't quit the same as the old co
Shrikant Kelkar 2013/12/17 22:43:34 sorry, didn't get it?
sky 2013/12/17 22:58:55 The old code considered top_level as: params.
Shrikant Kelkar 2013/12/17 23:33:29 params.top_level is getting reassigned immediately
+ views::Widget::InitParams::TYPE_WINDOW))
+ return views::Widget::InitParams::TRANSLUCENT_WINDOW;
+
+ return views::Widget::InitParams::OPAQUE_WINDOW;
+}

Powered by Google App Engine
This is Rietveld 408576698