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

Unified Diff: chrome/browser/ui/webui/options/font_settings_handler.cc

Issue 8879016: Add more per-tab preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CHECK -> DCHECK Created 9 years 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: chrome/browser/ui/webui/options/font_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc
index f31924467598337c09a3db0d9e09e0e4b19bd4bc..ef2ae123f6fccf88d6a03b3af2240e1b5ffaaf54 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/font_settings_handler.cc
@@ -83,15 +83,19 @@ WebUIMessageHandler* FontSettingsHandler::Attach(WebUI* web_ui) {
FontSettingsUtilities::ValidateSavedFonts(pref_service);
// Register for preferences that we need to observe manually.
- standard_font_.Init(prefs::kWebKitStandardFontFamily, pref_service, this);
- serif_font_.Init(prefs::kWebKitSerifFontFamily, pref_service, this);
- sans_serif_font_.Init(prefs::kWebKitSansSerifFontFamily, pref_service, this);
- fixed_font_.Init(prefs::kWebKitFixedFontFamily, pref_service, this);
- font_encoding_.Init(prefs::kDefaultCharset, pref_service, this);
- default_font_size_.Init(prefs::kWebKitDefaultFontSize, pref_service, this);
- default_fixed_font_size_.Init(prefs::kWebKitDefaultFixedFontSize,
+ standard_font_.Init(prefs::kWebKitGlobalStandardFontFamily,
+ pref_service, this);
+ serif_font_.Init(prefs::kWebKitGlobalSerifFontFamily, pref_service, this);
+ sans_serif_font_.Init(prefs::kWebKitGlobalSansSerifFontFamily,
+ pref_service, this);
+ fixed_font_.Init(prefs::kWebKitGlobalFixedFontFamily, pref_service, this);
+ font_encoding_.Init(prefs::kGlobalDefaultCharset, pref_service, this);
+ default_font_size_.Init(prefs::kWebKitGlobalDefaultFontSize,
+ pref_service, this);
+ default_fixed_font_size_.Init(prefs::kWebKitGlobalDefaultFixedFontSize,
pref_service, this);
- minimum_font_size_.Init(prefs::kWebKitMinimumFontSize, pref_service, this);
+ minimum_font_size_.Init(prefs::kWebKitGlobalMinimumFontSize,
+ pref_service, this);
// Return result from the superclass.
return handler;
@@ -157,20 +161,20 @@ void FontSettingsHandler::Observe(int type,
const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_PREF_CHANGED) {
std::string* pref_name = content::Details<std::string>(details).ptr();
- if (*pref_name == prefs::kWebKitStandardFontFamily) {
+ if (*pref_name == prefs::kWebKitGlobalStandardFontFamily) {
SetUpStandardFontSample();
- } else if (*pref_name == prefs::kWebKitSerifFontFamily) {
+ } else if (*pref_name == prefs::kWebKitGlobalSerifFontFamily) {
SetUpSerifFontSample();
- } else if (*pref_name == prefs::kWebKitSansSerifFontFamily) {
+ } else if (*pref_name == prefs::kWebKitGlobalSansSerifFontFamily) {
SetUpSansSerifFontSample();
- } else if (*pref_name == prefs::kWebKitFixedFontFamily ||
- *pref_name == prefs::kWebKitDefaultFixedFontSize) {
+ } else if (*pref_name == prefs::kWebKitGlobalFixedFontFamily ||
+ *pref_name == prefs::kWebKitGlobalDefaultFixedFontSize) {
SetUpFixedFontSample();
- } else if (*pref_name == prefs::kWebKitDefaultFontSize) {
+ } else if (*pref_name == prefs::kWebKitGlobalDefaultFontSize) {
SetUpStandardFontSample();
SetUpSerifFontSample();
SetUpSansSerifFontSample();
- } else if (*pref_name == prefs::kWebKitMinimumFontSize) {
+ } else if (*pref_name == prefs::kWebKitGlobalMinimumFontSize) {
SetUpMinimumFontSample();
}
}

Powered by Google App Engine
This is Rietveld 408576698