| 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 "chrome/browser/ui/webui/options2/font_settings_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/font_settings_handler2.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 RegisterStrings(localized_strings, resources, arraysize(resources)); | 63 RegisterStrings(localized_strings, resources, arraysize(resources)); |
| 64 RegisterTitle(localized_strings, "fontSettingsPage", | 64 RegisterTitle(localized_strings, "fontSettingsPage", |
| 65 IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE); | 65 IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE); |
| 66 localized_strings->SetString("fontSettingsPlaceholder", | 66 localized_strings->SetString("fontSettingsPlaceholder", |
| 67 l10n_util::GetStringUTF16( | 67 l10n_util::GetStringUTF16( |
| 68 IDS_FONT_LANGUAGE_SETTING_PLACEHOLDER)); | 68 IDS_FONT_LANGUAGE_SETTING_PLACEHOLDER)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void FontSettingsHandler::Initialize() { | 71 void FontSettingsHandler::InitializePage() { |
| 72 DCHECK(web_ui()); | 72 DCHECK(web_ui()); |
| 73 SetUpStandardFontSample(); | 73 SetUpStandardFontSample(); |
| 74 SetUpSerifFontSample(); | 74 SetUpSerifFontSample(); |
| 75 SetUpSansSerifFontSample(); | 75 SetUpSansSerifFontSample(); |
| 76 SetUpFixedFontSample(); | 76 SetUpFixedFontSample(); |
| 77 SetUpMinimumFontSample(); | 77 SetUpMinimumFontSample(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void FontSettingsHandler::RegisterMessages() { | 80 void FontSettingsHandler::RegisterMessages() { |
| 81 // Perform validation for saved fonts. | 81 // Perform validation for saved fonts. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 "FontSettings.setUpFixedFontSample", font_value, size_value); | 203 "FontSettings.setUpFixedFontSample", font_value, size_value); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void FontSettingsHandler::SetUpMinimumFontSample() { | 206 void FontSettingsHandler::SetUpMinimumFontSample() { |
| 207 base::FundamentalValue size_value(minimum_font_size_.GetValue()); | 207 base::FundamentalValue size_value(minimum_font_size_.GetValue()); |
| 208 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample", | 208 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample", |
| 209 size_value); | 209 size_value); |
| 210 } | 210 } |
| 211 | 211 |
| 212 } // namespace options2 | 212 } // namespace options2 |
| OLD | NEW |