diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-06 09:48:34 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-06 09:48:34 +0000 |
commit | 4dde4c672d45c4c01e5e78f8527bcdc1c7ba561d (patch) | |
tree | 0220d1694ffa2a1fc4a4084725d75ed9f5dc8f50 /ui | |
parent | 00e4ebaa46ee1647cb3bc6f13d8f45a0dc805e97 (diff) | |
download | chromium_src-4dde4c672d45c4c01e5e78f8527bcdc1c7ba561d.zip chromium_src-4dde4c672d45c4c01e5e78f8527bcdc1c7ba561d.tar.gz chromium_src-4dde4c672d45c4c01e5e78f8527bcdc1c7ba561d.tar.bz2 |
New Windows high-contrast mode bubble.
When Windows high-contrast mode is on, pop up new bubble with links to a
high-contrast extension, a search for dark themes, a link to Learn More,
and a Close link to close the bubble. Only shows the first time, as before.
The pref is renamed because the previous behavior was reverted, and users
who got the previous bubble on dev/beta should see this one now.
BUG=112944
TEST=manual testing on Windows: Alt+Shift+PrtScr
TBR=ben
Review URL: http://codereview.chromium.org/10332016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/sys_color_change_listener.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/ui/gfx/sys_color_change_listener.cc b/ui/gfx/sys_color_change_listener.cc index 8a6f43b..7a9fc84 100644 --- a/ui/gfx/sys_color_change_listener.cc +++ b/ui/gfx/sys_color_change_listener.cc @@ -25,19 +25,16 @@ bool g_is_inverted_color_scheme_initialized = false; void UpdateInvertedColorScheme() { #if defined(OS_WIN) - int foreground = color_utils::GetLuminanceForColor( + int foreground_luminance = color_utils::GetLuminanceForColor( color_utils::GetSysSkColor(COLOR_WINDOWTEXT)); - int background = color_utils::GetLuminanceForColor( + int background_luminance = color_utils::GetLuminanceForColor( color_utils::GetSysSkColor(COLOR_WINDOW)); HIGHCONTRAST high_contrast = {0}; high_contrast.cbSize = sizeof(HIGHCONTRAST); - - // TODO(dmazzoni): this is temporarily disabled until the color inverting - // can be made optional or the need is addressed some other way. - // http://crbug.com/112944 - //g_is_inverted_color_scheme = - // SystemParametersInfo(SPI_GETHIGHCONTRAST, 0, &high_contrast, 0) && - // ((high_contrast.dwFlags & HCF_HIGHCONTRASTON) != 0); + g_is_inverted_color_scheme = + SystemParametersInfo(SPI_GETHIGHCONTRAST, 0, &high_contrast, 0) && + ((high_contrast.dwFlags & HCF_HIGHCONTRASTON) != 0) && + foreground_luminance > background_luminance; g_is_inverted_color_scheme_initialized = true; #endif } |