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

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

Issue 6602021: web-ui settings: Standard font setting now correlates to WebKit's standard fo... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase Created 9 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/options/font_settings_handler.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/font_settings_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/font_settings_handler.cc (revision 76410)
+++ chrome/browser/ui/webui/options/font_settings_handler.cc (working copy)
@@ -68,7 +68,7 @@
void FontSettingsHandler::Initialize() {
DCHECK(web_ui_);
- SetupSerifFontSample();
+ SetupStandardFontSample();
SetupMinimumFontSample();
SetupFixedFontSample();
}
@@ -83,7 +83,7 @@
FontSettingsUtilities::ValidateSavedFonts(pref_service);
// Register for preferences that we need to observe manually.
- serif_font_.Init(prefs::kWebKitSerifFontFamily, pref_service, this);
+ standard_font_.Init(prefs::kWebKitStandardFontFamily, 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);
@@ -137,7 +137,7 @@
}
ListValue selected_values;
- selected_values.Append(Value::CreateStringValue(serif_font_.GetValue()));
+ selected_values.Append(Value::CreateStringValue(standard_font_.GetValue()));
selected_values.Append(Value::CreateStringValue(fixed_font_.GetValue()));
selected_values.Append(Value::CreateStringValue(font_encoding_.GetValue()));
@@ -150,9 +150,9 @@
const NotificationDetails& details) {
if (type == NotificationType::PREF_CHANGED) {
std::string* pref_name = Details<std::string>(details).ptr();
- if (*pref_name == prefs::kWebKitSerifFontFamily ||
+ if (*pref_name == prefs::kWebKitStandardFontFamily ||
*pref_name == prefs::kWebKitDefaultFontSize) {
- SetupSerifFontSample();
+ SetupStandardFontSample();
} else if (*pref_name == prefs::kWebKitFixedFontFamily ||
*pref_name == prefs::kWebKitDefaultFixedFontSize) {
SetupFixedFontSample();
@@ -162,11 +162,11 @@
}
}
-void FontSettingsHandler::SetupSerifFontSample() {
- StringValue font_value(serif_font_.GetValue());
+void FontSettingsHandler::SetupStandardFontSample() {
+ StringValue font_value(standard_font_.GetValue());
FundamentalValue size_value(default_font_size_.GetValue());
web_ui_->CallJavascriptFunction(
- L"FontSettings.setupSerifFontSample", font_value, size_value);
+ L"FontSettings.setupStandardFontSample", font_value, size_value);
}
void FontSettingsHandler::SetupFixedFontSample() {
« no previous file with comments | « chrome/browser/ui/webui/options/font_settings_handler.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698