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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/test/test_views_delegate.h" 5 #include "ui/views/test/test_views_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/public/test/web_contents_tester.h" 9 #include "content/public/test/web_contents_tester.h"
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 gfx::ImageSkia* TestViewsDelegate::GetDefaultWindowIcon() const { 47 gfx::ImageSkia* TestViewsDelegate::GetDefaultWindowIcon() const {
48 return NULL; 48 return NULL;
49 } 49 }
50 #endif 50 #endif
51 51
52 NonClientFrameView* TestViewsDelegate::CreateDefaultNonClientFrameView( 52 NonClientFrameView* TestViewsDelegate::CreateDefaultNonClientFrameView(
53 Widget* widget) { 53 Widget* widget) {
54 return NULL; 54 return NULL;
55 } 55 }
56 56
57 bool TestViewsDelegate::UseTransparentWindows() const { 57 bool TestViewsDelegate::UseTransparentWindows(
58 Widget::InitParams* params) const {
58 return use_transparent_windows_; 59 return use_transparent_windows_;
59 } 60 }
60 61
61 content::WebContents* TestViewsDelegate::CreateWebContents( 62 content::WebContents* TestViewsDelegate::CreateWebContents(
62 content::BrowserContext* browser_context, 63 content::BrowserContext* browser_context,
63 content::SiteInstance* site_instance) { 64 content::SiteInstance* site_instance) {
64 return NULL; 65 return NULL;
65 } 66 }
66 67
67 void TestViewsDelegate::OnBeforeWidgetInit( 68 void TestViewsDelegate::OnBeforeWidgetInit(
68 Widget::InitParams* params, 69 Widget::InitParams* params,
69 internal::NativeWidgetDelegate* delegate) { 70 internal::NativeWidgetDelegate* delegate) {
71 if (!params)
sky 2013/12/12 23:58:14 This if shouldn't be necessary.
Shrikant Kelkar 2013/12/17 07:06:21 Done.
72 return;
73
74 if (params->opacity == InitParams::INFER_OPACITY) {
75 if (use_transparent_windows_)
76 params->opacity = InitParams::TRANSLUCENT_WINDOW;
77 else
78 params->opacity = InitParams::OPAQUE_WINDOW;
79 }
70 } 80 }
71 81
72 base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { 82 base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() {
73 return base::TimeDelta(); 83 return base::TimeDelta();
74 } 84 }
75 85
76 } // namespace views 86 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698