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

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: ChromeOS build 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
« no previous file with comments | « ui/views/test/test_views_delegate.h ('k') | ui/views/views_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6a3565cf2c2b0529c32d4cf6c43f48a5189f24ce 100644
--- a/ui/views/test/test_views_delegate.cc
+++ b/ui/views/test/test_views_delegate.cc
@@ -54,10 +54,6 @@ NonClientFrameView* TestViewsDelegate::CreateDefaultNonClientFrameView(
return NULL;
}
-bool TestViewsDelegate::UseTransparentWindows() const {
- return use_transparent_windows_;
-}
-
content::WebContents* TestViewsDelegate::CreateWebContents(
content::BrowserContext* browser_context,
content::SiteInstance* site_instance) {
@@ -67,6 +63,12 @@ content::WebContents* TestViewsDelegate::CreateWebContents(
void TestViewsDelegate::OnBeforeWidgetInit(
Widget::InitParams* params,
internal::NativeWidgetDelegate* delegate) {
+ if (params->opacity == Widget::InitParams::INFER_OPACITY) {
+ if (use_transparent_windows_)
+ params->opacity = Widget::InitParams::TRANSLUCENT_WINDOW;
+ else
+ params->opacity = Widget::InitParams::OPAQUE_WINDOW;
+ }
}
base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
« no previous file with comments | « ui/views/test/test_views_delegate.h ('k') | ui/views/views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698