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

Unified Diff: ui/views/test/test_views_delegate.cc

Issue 108193005: Fixing opacity for browser frame window on ASH/Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved logic to OnBeforeWidgetInit 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: ui/views/test/test_views_delegate.cc
diff --git a/ui/views/test/test_views_delegate.cc b/ui/views/test/test_views_delegate.cc
index a310121acd06833756718b8a107884c806b55fd3..7635bf2f46f0e7be4f298156ce42490c1095da6f 100644
--- a/ui/views/test/test_views_delegate.cc
+++ b/ui/views/test/test_views_delegate.cc
@@ -54,7 +54,8 @@ NonClientFrameView* TestViewsDelegate::CreateDefaultNonClientFrameView(
return NULL;
}
-bool TestViewsDelegate::UseTransparentWindows() const {
+bool TestViewsDelegate::UseTransparentWindows(
+ Widget::InitParams* params) const {
return use_transparent_windows_;
}
@@ -67,6 +68,15 @@ content::WebContents* TestViewsDelegate::CreateWebContents(
void TestViewsDelegate::OnBeforeWidgetInit(
Widget::InitParams* params,
internal::NativeWidgetDelegate* delegate) {
+ if (!params)
sky 2013/12/12 23:58:14 This if shouldn't be necessary.
Shrikant Kelkar 2013/12/17 07:06:21 Done.
+ return;
+
+ if (params->opacity == InitParams::INFER_OPACITY) {
+ if (use_transparent_windows_)
+ params->opacity = InitParams::TRANSLUCENT_WINDOW;
+ else
+ params->opacity = InitParams::OPAQUE_WINDOW;
+ }
}
base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {

Powered by Google App Engine
This is Rietveld 408576698