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/native_theme/native_theme_win.h" | 5 #include "ui/native_theme/native_theme_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <uxtheme.h> | 9 #include <uxtheme.h> |
10 #include <vsstyle.h> | 10 #include <vsstyle.h> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 base::win::ScopedCreateDC dc_; | 143 base::win::ScopedCreateDC dc_; |
144 base::win::ScopedBitmap bitmap_; | 144 base::win::ScopedBitmap bitmap_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(ScopedCreateDCWithBitmap); | 146 DISALLOW_COPY_AND_ASSIGN(ScopedCreateDCWithBitmap); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace | 149 } // namespace |
150 | 150 |
151 namespace ui { | 151 namespace ui { |
152 | 152 |
| 153 NativeTheme* NativeTheme::GetInstanceForNativeUi() { |
| 154 return NativeThemeWin::instance(); |
| 155 } |
| 156 |
153 bool NativeThemeWin::IsThemingActive() const { | 157 bool NativeThemeWin::IsThemingActive() const { |
154 return is_theme_active_ && is_theme_active_(); | 158 return is_theme_active_ && is_theme_active_(); |
155 } | 159 } |
156 | 160 |
157 bool NativeThemeWin::IsUsingHighContrastTheme() const { | 161 bool NativeThemeWin::IsUsingHighContrastTheme() const { |
158 if (is_using_high_contrast_valid_) | 162 if (is_using_high_contrast_valid_) |
159 return is_using_high_contrast_; | 163 return is_using_high_contrast_; |
160 HIGHCONTRAST result; | 164 HIGHCONTRAST result; |
161 result.cbSize = sizeof(HIGHCONTRAST); | 165 result.cbSize = sizeof(HIGHCONTRAST); |
162 is_using_high_contrast_ = | 166 is_using_high_contrast_ = |
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 break; | 2116 break; |
2113 case LAST: | 2117 case LAST: |
2114 NOTREACHED(); | 2118 NOTREACHED(); |
2115 break; | 2119 break; |
2116 } | 2120 } |
2117 theme_handles_[theme_name] = handle; | 2121 theme_handles_[theme_name] = handle; |
2118 return handle; | 2122 return handle; |
2119 } | 2123 } |
2120 | 2124 |
2121 } // namespace ui | 2125 } // namespace ui |
OLD | NEW |