| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/dom_ui/options/font_settings_handler.h" | 5 #include "chrome/browser/dom_ui/options/font_settings_handler.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/character_encoding.h" | 12 #include "chrome/browser/character_encoding.h" |
| 13 #include "chrome/browser/dom_ui/options/font_settings_utils.h" | 13 #include "chrome/browser/dom_ui/options/font_settings_utils.h" |
| 14 #include "chrome/browser/prefs/pref_service.h" | 14 #include "chrome/browser/prefs/pref_service.h" |
| 15 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/common/notification_service.h" | 16 #include "chrome/common/notification_service.h" |
| 17 #include "chrome/common/notification_type.h" | 17 #include "chrome/common/notification_type.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "grit/chromium_strings.h" | 19 #include "grit/chromium_strings.h" |
| 20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 21 | 21 |
| 22 FontSettingsHandler::FontSettingsHandler() { | 22 FontSettingsHandler::FontSettingsHandler() { |
| 23 } | 23 } |
| 24 | 24 |
| 25 FontSettingsHandler::~FontSettingsHandler() { | 25 FontSettingsHandler::~FontSettingsHandler() { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 L"FontSettings.setupSansSerifFontPreview", font_value, size_value); | 175 L"FontSettings.setupSansSerifFontPreview", font_value, size_value); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void FontSettingsHandler::SetupFixedFontPreview() { | 178 void FontSettingsHandler::SetupFixedFontPreview() { |
| 179 DCHECK(dom_ui_); | 179 DCHECK(dom_ui_); |
| 180 StringValue font_value(fixed_font_.GetValue()); | 180 StringValue font_value(fixed_font_.GetValue()); |
| 181 FundamentalValue size_value(default_fixed_font_size_.GetValue()); | 181 FundamentalValue size_value(default_fixed_font_size_.GetValue()); |
| 182 dom_ui_->CallJavascriptFunction( | 182 dom_ui_->CallJavascriptFunction( |
| 183 L"FontSettings.setupFixedFontPreview", font_value, size_value); | 183 L"FontSettings.setupFixedFontPreview", font_value, size_value); |
| 184 } | 184 } |
| OLD | NEW |