| 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 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2118 break; | 2122 break; |
| 2119 case LAST: | 2123 case LAST: |
| 2120 NOTREACHED(); | 2124 NOTREACHED(); |
| 2121 break; | 2125 break; |
| 2122 } | 2126 } |
| 2123 theme_handles_[theme_name] = handle; | 2127 theme_handles_[theme_name] = handle; |
| 2124 return handle; | 2128 return handle; |
| 2125 } | 2129 } |
| 2126 | 2130 |
| 2127 } // namespace ui | 2131 } // namespace ui |
| OLD | NEW |