OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Loading... |
28 FontSettingsHandler::~FontSettingsHandler() { | 28 FontSettingsHandler::~FontSettingsHandler() { |
29 } | 29 } |
30 | 30 |
31 void FontSettingsHandler::GetLocalizedValues( | 31 void FontSettingsHandler::GetLocalizedValues( |
32 DictionaryValue* localized_strings) { | 32 DictionaryValue* localized_strings) { |
33 DCHECK(localized_strings); | 33 DCHECK(localized_strings); |
34 | 34 |
35 localized_strings->SetString("fontSettingsTitle", | 35 localized_strings->SetString("fontSettingsTitle", |
36 l10n_util::GetStringUTF16(IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE)); | 36 l10n_util::GetStringUTF16(IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE)); |
37 localized_strings->SetString("fontSettingsStandard", | 37 localized_strings->SetString("fontSettingsStandard", |
38 l10n_util::GetStringUTF16( | 38 dom_options_util::StripColon( |
39 IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_FONT_TITLE)); | 39 l10n_util::GetStringUTF16( |
| 40 IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_STANDARD_LABEL))); |
40 localized_strings->SetString("fontSettingsFixedWidth", | 41 localized_strings->SetString("fontSettingsFixedWidth", |
41 dom_options_util::StripColon( | 42 dom_options_util::StripColon( |
42 l10n_util::GetStringUTF16( | 43 l10n_util::GetStringUTF16( |
43 IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_FIXED_WIDTH_LABEL))); | 44 IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_FIXED_WIDTH_LABEL))); |
44 localized_strings->SetString("fontSettingsMinimumSize", | 45 localized_strings->SetString("fontSettingsMinimumSize", |
45 l10n_util::GetStringUTF16( | 46 l10n_util::GetStringUTF16( |
46 IDS_FONT_LANGUAGE_SETTING_MINIMUM_FONT_SIZE_TITLE)); | 47 IDS_FONT_LANGUAGE_SETTING_MINIMUM_FONT_SIZE_TITLE)); |
47 localized_strings->SetString("fontSettingsEncoding", | 48 localized_strings->SetString("fontSettingsEncoding", |
48 l10n_util::GetStringUTF16( | 49 l10n_util::GetStringUTF16( |
49 IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_ENCODING_TITLE)); | 50 IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_ENCODING_TITLE)); |
50 localized_strings->SetString("fontSettingsSerifLabel", | |
51 l10n_util::GetStringUTF16( | |
52 IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SERIF_LABEL)); | |
53 localized_strings->SetString("fontSettingsSansSerifLabel", | |
54 l10n_util::GetStringUTF16( | |
55 IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SANS_SERIF_LABEL)); | |
56 localized_strings->SetString("fontSettingsSizeLabel", | 51 localized_strings->SetString("fontSettingsSizeLabel", |
57 l10n_util::GetStringUTF16( | 52 l10n_util::GetStringUTF16( |
58 IDS_FONT_LANGUAGE_SETTING_FONT_SIZE_SELECTOR_LABEL)); | 53 IDS_FONT_LANGUAGE_SETTING_FONT_SIZE_SELECTOR_LABEL)); |
59 localized_strings->SetString("fontSettingsSizeTiny", | 54 localized_strings->SetString("fontSettingsSizeTiny", |
60 l10n_util::GetStringUTF16( | 55 l10n_util::GetStringUTF16( |
61 IDS_FONT_LANGUAGE_SETTING_FONT_SIZE_TINY)); | 56 IDS_FONT_LANGUAGE_SETTING_FONT_SIZE_TINY)); |
62 localized_strings->SetString("fontSettingsSizeHuge", | 57 localized_strings->SetString("fontSettingsSizeHuge", |
63 l10n_util::GetStringUTF16( | 58 l10n_util::GetStringUTF16( |
64 IDS_FONT_LANGUAGE_SETTING_FONT_SIZE_HUGE)); | 59 IDS_FONT_LANGUAGE_SETTING_FONT_SIZE_HUGE)); |
65 localized_strings->SetString("fontSettingsEncodingLabel", | 60 localized_strings->SetString("fontSettingsEncodingLabel", |
(...skipping 118 matching lines...) Loading... |
184 dom_ui_->CallJavascriptFunction( | 179 dom_ui_->CallJavascriptFunction( |
185 L"FontSettings.setupFixedFontSample", font_value, size_value); | 180 L"FontSettings.setupFixedFontSample", font_value, size_value); |
186 } | 181 } |
187 | 182 |
188 void FontSettingsHandler::SetupMinimumFontSample() { | 183 void FontSettingsHandler::SetupMinimumFontSample() { |
189 DCHECK(dom_ui_); | 184 DCHECK(dom_ui_); |
190 FundamentalValue size_value(minimum_font_size_.GetValue()); | 185 FundamentalValue size_value(minimum_font_size_.GetValue()); |
191 dom_ui_->CallJavascriptFunction( | 186 dom_ui_->CallJavascriptFunction( |
192 L"FontSettings.setupMinimumFontSample", size_value); | 187 L"FontSettings.setupMinimumFontSample", size_value); |
193 } | 188 } |
OLD | NEW |