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 | |
157 bool NativeThemeWin::IsThemingActive() const { | 153 bool NativeThemeWin::IsThemingActive() const { |
158 return is_theme_active_ && is_theme_active_(); | 154 return is_theme_active_ && is_theme_active_(); |
159 } | 155 } |
160 | 156 |
161 bool NativeThemeWin::IsUsingHighContrastTheme() const { | 157 bool NativeThemeWin::IsUsingHighContrastTheme() const { |
162 if (is_using_high_contrast_valid_) | 158 if (is_using_high_contrast_valid_) |
163 return is_using_high_contrast_; | 159 return is_using_high_contrast_; |
164 HIGHCONTRAST result; | 160 HIGHCONTRAST result; |
165 result.cbSize = sizeof(HIGHCONTRAST); | 161 result.cbSize = sizeof(HIGHCONTRAST); |
166 is_using_high_contrast_ = | 162 is_using_high_contrast_ = |
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2116 break; | 2112 break; |
2117 case LAST: | 2113 case LAST: |
2118 NOTREACHED(); | 2114 NOTREACHED(); |
2119 break; | 2115 break; |
2120 } | 2116 } |
2121 theme_handles_[theme_name] = handle; | 2117 theme_handles_[theme_name] = handle; |
2122 return handle; | 2118 return handle; |
2123 } | 2119 } |
2124 | 2120 |
2125 } // namespace ui | 2121 } // namespace ui |
OLD | NEW |