| 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_ui.h" | 5 #include "chrome/browser/dom_ui/options_ui.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
| 43 #include "grit/locale_settings.h" | 43 #include "grit/locale_settings.h" |
| 44 #include "grit/theme_resources.h" | 44 #include "grit/theme_resources.h" |
| 45 | 45 |
| 46 #if defined(OS_CHROMEOS) | 46 #if defined(OS_CHROMEOS) |
| 47 #include "chrome/browser/chromeos/dom_ui/accounts_options_handler.h" | 47 #include "chrome/browser/chromeos/dom_ui/accounts_options_handler.h" |
| 48 #include "chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h" | 48 #include "chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h" |
| 49 #include "chrome/browser/chromeos/dom_ui/labs_handler.h" | 49 #include "chrome/browser/chromeos/dom_ui/labs_handler.h" |
| 50 #include "chrome/browser/chromeos/dom_ui/language_chewing_options_handler.h" | 50 #include "chrome/browser/chromeos/dom_ui/language_chewing_options_handler.h" |
| 51 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h" | 51 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h" |
| 52 #include "chrome/browser/chromeos/dom_ui/language_mozc_options_handler.h" |
| 52 #include "chrome/browser/chromeos/dom_ui/language_options_handler.h" | 53 #include "chrome/browser/chromeos/dom_ui/language_options_handler.h" |
| 53 #include "chrome/browser/chromeos/dom_ui/language_pinyin_options_handler.h" | 54 #include "chrome/browser/chromeos/dom_ui/language_pinyin_options_handler.h" |
| 54 #include "chrome/browser/chromeos/dom_ui/system_options_handler.h" | 55 #include "chrome/browser/chromeos/dom_ui/system_options_handler.h" |
| 55 #endif | 56 #endif |
| 56 | 57 |
| 57 //////////////////////////////////////////////////////////////////////////////// | 58 //////////////////////////////////////////////////////////////////////////////// |
| 58 // | 59 // |
| 59 // OptionsUIHTMLSource | 60 // OptionsUIHTMLSource |
| 60 // | 61 // |
| 61 //////////////////////////////////////////////////////////////////////////////// | 62 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); | 129 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); |
| 129 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); | 130 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); |
| 130 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
| 131 AddOptionsPageUIHandler(localized_strings, | 132 AddOptionsPageUIHandler(localized_strings, |
| 132 new chromeos::AccountsOptionsHandler()); | 133 new chromeos::AccountsOptionsHandler()); |
| 133 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); | 134 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); |
| 134 AddOptionsPageUIHandler(localized_strings, | 135 AddOptionsPageUIHandler(localized_strings, |
| 135 new LanguageChewingOptionsHandler()); | 136 new LanguageChewingOptionsHandler()); |
| 136 AddOptionsPageUIHandler(localized_strings, | 137 AddOptionsPageUIHandler(localized_strings, |
| 137 new LanguageHangulOptionsHandler()); | 138 new LanguageHangulOptionsHandler()); |
| 139 AddOptionsPageUIHandler(localized_strings, |
| 140 new LanguageMozcOptionsHandler()); |
| 138 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 141 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
| 139 AddOptionsPageUIHandler(localized_strings, | 142 AddOptionsPageUIHandler(localized_strings, |
| 140 new LanguagePinyinOptionsHandler()); | 143 new LanguagePinyinOptionsHandler()); |
| 141 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); | 144 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); |
| 142 #endif | 145 #endif |
| 143 | 146 |
| 144 // |localized_strings| ownership is taken over by this constructor. | 147 // |localized_strings| ownership is taken over by this constructor. |
| 145 OptionsUIHTMLSource* html_source = | 148 OptionsUIHTMLSource* html_source = |
| 146 new OptionsUIHTMLSource(localized_strings); | 149 new OptionsUIHTMLSource(localized_strings); |
| 147 | 150 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 168 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); | 171 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); |
| 169 } | 172 } |
| 170 } | 173 } |
| 171 | 174 |
| 172 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, | 175 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, |
| 173 OptionsPageUIHandler* handler) { | 176 OptionsPageUIHandler* handler) { |
| 174 DCHECK(handler); | 177 DCHECK(handler); |
| 175 handler->GetLocalizedValues(localized_strings); | 178 handler->GetLocalizedValues(localized_strings); |
| 176 AddMessageHandler(handler->Attach(this)); | 179 AddMessageHandler(handler->Attach(this)); |
| 177 } | 180 } |
| OLD | NEW |