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

Side by Side Diff: ui/native_theme/native_theme_win.cc

Issue 2484973003: Revert of Clean up some NativeTheme code. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 break; 2118 break;
2123 case LAST: 2119 case LAST:
2124 NOTREACHED(); 2120 NOTREACHED();
2125 break; 2121 break;
2126 } 2122 }
2127 theme_handles_[theme_name] = handle; 2123 theme_handles_[theme_name] = handle;
2128 return handle; 2124 return handle;
2129 } 2125 }
2130 2126
2131 } // namespace ui 2127 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698