| 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/gfx/font_smoothing_win.h" | 5 #include "ui/gfx/font_smoothing_win.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "ui/gfx/win/singleton_hwnd.h" | 8 #include "ui/gfx/win/singleton_hwnd.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 // Listener for WM_SETTINGCHANGE notifications. | 30 // Listener for WM_SETTINGCHANGE notifications. |
| 31 virtual void OnWndProc(HWND hwnd, | 31 virtual void OnWndProc(HWND hwnd, |
| 32 UINT message, | 32 UINT message, |
| 33 WPARAM wparam, | 33 WPARAM wparam, |
| 34 LPARAM lparam) OVERRIDE; | 34 LPARAM lparam) OVERRIDE; |
| 35 | 35 |
| 36 // Queries the font settings from the system. | 36 // Queries the font settings from the system. |
| 37 void QueryFontSettings(); | 37 void QueryFontSettings(); |
| 38 | 38 |
| 39 // Indicates whether the MessagePumpObserver has been registered. | 39 // Indicates whether the SingletonHwnd::Observer has been registered. |
| 40 bool observer_added_; | 40 bool observer_added_; |
| 41 | 41 |
| 42 // Indicates whether |smoothing_enabled_| and |cleartype_enabled_| are valid | 42 // Indicates whether |smoothing_enabled_| and |cleartype_enabled_| are valid |
| 43 // or need to be re-queried from the system. | 43 // or need to be re-queried from the system. |
| 44 bool need_to_query_settings_; | 44 bool need_to_query_settings_; |
| 45 | 45 |
| 46 // Indicates that font smoothing is enabled. | 46 // Indicates that font smoothing is enabled. |
| 47 bool smoothing_enabled_; | 47 bool smoothing_enabled_; |
| 48 | 48 |
| 49 // Indicates that the ClearType font smoothing is enabled. | 49 // Indicates that the ClearType font smoothing is enabled. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 namespace gfx { | 112 namespace gfx { |
| 113 | 113 |
| 114 void GetCachedFontSmoothingSettings(bool* smoothing_enabled, | 114 void GetCachedFontSmoothingSettings(bool* smoothing_enabled, |
| 115 bool* cleartype_enabled) { | 115 bool* cleartype_enabled) { |
| 116 CachedFontSmoothingSettings::GetInstance()->GetFontSmoothingSettings( | 116 CachedFontSmoothingSettings::GetInstance()->GetFontSmoothingSettings( |
| 117 smoothing_enabled, | 117 smoothing_enabled, |
| 118 cleartype_enabled); | 118 cleartype_enabled); |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace gfx | 121 } // namespace gfx |
| OLD | NEW |