OLD | NEW |
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 Loading... |
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 { | |
58 return use_transparent_windows_; | |
59 } | |
60 | |
61 content::WebContents* TestViewsDelegate::CreateWebContents( | 57 content::WebContents* TestViewsDelegate::CreateWebContents( |
62 content::BrowserContext* browser_context, | 58 content::BrowserContext* browser_context, |
63 content::SiteInstance* site_instance) { | 59 content::SiteInstance* site_instance) { |
64 return NULL; | 60 return NULL; |
65 } | 61 } |
66 | 62 |
67 void TestViewsDelegate::OnBeforeWidgetInit( | 63 void TestViewsDelegate::OnBeforeWidgetInit( |
68 Widget::InitParams* params, | 64 Widget::InitParams* params, |
69 internal::NativeWidgetDelegate* delegate) { | 65 internal::NativeWidgetDelegate* delegate) { |
| 66 if (params->opacity == Widget::InitParams::INFER_OPACITY) { |
| 67 if (use_transparent_windows_) |
| 68 params->opacity = Widget::InitParams::TRANSLUCENT_WINDOW; |
| 69 else |
| 70 params->opacity = Widget::InitParams::OPAQUE_WINDOW; |
| 71 } |
70 } | 72 } |
71 | 73 |
72 base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { | 74 base::TimeDelta TestViewsDelegate::GetDefaultTextfieldObscuredRevealDuration() { |
73 return base::TimeDelta(); | 75 return base::TimeDelta(); |
74 } | 76 } |
75 | 77 |
76 } // namespace views | 78 } // namespace views |
OLD | NEW |