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

Unified Diff: ui/native_theme/native_theme_win.cc

Issue 239093007: Update Windows UI on system color changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase. Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/native_theme/native_theme_win.cc
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index a09be6c30e74669915ba344663dfa945d381e572..5f0a1a419af3447fa13d8dd47ef04f7ee8eaf9a0 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -27,7 +27,6 @@
#include "ui/gfx/gdi_util.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_conversions.h"
-#include "ui/gfx/sys_color_change_listener.h"
#include "ui/gfx/win/dpi.h"
#include "ui/native_theme/common_theme.h"
@@ -212,16 +211,6 @@ bool NativeThemeWin::IsClassicTheme(ThemeName name) const {
return !GetThemeHandle(name);
}
-// TODO(sky): seems like we should default to NativeThemeWin, but that currently
-// breaks a couple of tests (FocusTraversalTest.NormalTraversal in
-// views_unittests).
-#if !defined(USE_AURA)
-// static
-NativeTheme* NativeTheme::instance() {
- return NativeThemeWin::instance();
-}
-#endif
-
// static
NativeThemeWin* NativeThemeWin::instance() {
CR_DEFINE_STATIC_LOCAL(NativeThemeWin, s_native_theme, ());
@@ -344,6 +333,12 @@ void NativeThemeWin::Paint(SkCanvas* canvas,
PaintDirect(canvas, part, state, rect, extra);
}
+void NativeThemeWin::OnSysColorChange() {
+ UpdateSystemColors();
+ is_using_high_contrast_valid_ = false;
+ NativeTheme::OnSysColorChange();
+}
+
NativeThemeWin::NativeThemeWin()
: theme_dll_(LoadLibrary(L"uxtheme.dll")),
draw_theme_(NULL),
@@ -356,7 +351,6 @@ NativeThemeWin::NativeThemeWin()
set_theme_properties_(NULL),
is_theme_active_(NULL),
get_theme_int_(NULL),
- color_change_listener_(this),
is_using_high_contrast_(false),
is_using_high_contrast_valid_(false) {
if (theme_dll_) {
@@ -396,11 +390,6 @@ NativeThemeWin::~NativeThemeWin() {
}
}
-void NativeThemeWin::OnSysColorChange() {
- UpdateSystemColors();
- is_using_high_contrast_valid_ = false;
-}
-
void NativeThemeWin::UpdateSystemColors() {
for (int i = 0; i < arraysize(kSystemColors); ++i) {
system_colors_[kSystemColors[i]] =

Powered by Google App Engine
This is Rietveld 408576698