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

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

Issue 2483683002: Try to get rid of all direct references to particular native themes. (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_win.h ('k') | ui/views/mus/native_widget_mus.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
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
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
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_win.h ('k') | ui/views/mus/native_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698