| 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 <algorithm> |
| 8 |
| 7 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| 9 #include "base/callback.h" | 11 #include "base/callback.h" |
| 10 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
| 11 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 12 #include "base/singleton.h" | 14 #include "base/singleton.h" |
| 13 #include "base/string_piece.h" | 15 #include "base/string_piece.h" |
| 14 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 15 #include "base/thread.h" | 17 #include "base/thread.h" |
| 16 #include "base/time.h" | 18 #include "base/time.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 39 | 41 |
| 40 #include "grit/browser_resources.h" | 42 #include "grit/browser_resources.h" |
| 41 #include "grit/chromium_strings.h" | 43 #include "grit/chromium_strings.h" |
| 42 #include "grit/generated_resources.h" | 44 #include "grit/generated_resources.h" |
| 43 #include "grit/locale_settings.h" | 45 #include "grit/locale_settings.h" |
| 44 #include "grit/theme_resources.h" | 46 #include "grit/theme_resources.h" |
| 45 | 47 |
| 46 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
| 47 #include "chrome/browser/chromeos/dom_ui/accounts_options_handler.h" | 49 #include "chrome/browser/chromeos/dom_ui/accounts_options_handler.h" |
| 48 #include "chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h" | 50 #include "chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h" |
| 51 #include "chrome/browser/chromeos/dom_ui/internet_options_handler.h" |
| 49 #include "chrome/browser/chromeos/dom_ui/labs_handler.h" | 52 #include "chrome/browser/chromeos/dom_ui/labs_handler.h" |
| 50 #include "chrome/browser/chromeos/dom_ui/language_chewing_options_handler.h" | 53 #include "chrome/browser/chromeos/dom_ui/language_chewing_options_handler.h" |
| 51 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h" | 54 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h" |
| 52 #include "chrome/browser/chromeos/dom_ui/language_options_handler.h" | 55 #include "chrome/browser/chromeos/dom_ui/language_options_handler.h" |
| 53 #include "chrome/browser/chromeos/dom_ui/language_pinyin_options_handler.h" | 56 #include "chrome/browser/chromeos/dom_ui/language_pinyin_options_handler.h" |
| 54 #include "chrome/browser/chromeos/dom_ui/system_options_handler.h" | 57 #include "chrome/browser/chromeos/dom_ui/system_options_handler.h" |
| 55 #endif | 58 #endif |
| 56 | 59 |
| 57 //////////////////////////////////////////////////////////////////////////////// | 60 //////////////////////////////////////////////////////////////////////////////// |
| 58 // | 61 // |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); | 126 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); |
| 124 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); | 127 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); |
| 125 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 128 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
| 126 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 129 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
| 127 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 130 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
| 128 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); | 131 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); |
| 129 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); | 132 AddOptionsPageUIHandler(localized_strings, new SyncOptionsHandler()); |
| 130 #if defined(OS_CHROMEOS) | 133 #if defined(OS_CHROMEOS) |
| 131 AddOptionsPageUIHandler(localized_strings, | 134 AddOptionsPageUIHandler(localized_strings, |
| 132 new chromeos::AccountsOptionsHandler()); | 135 new chromeos::AccountsOptionsHandler()); |
| 136 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); |
| 133 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); | 137 AddOptionsPageUIHandler(localized_strings, new LabsHandler()); |
| 134 AddOptionsPageUIHandler(localized_strings, | 138 AddOptionsPageUIHandler(localized_strings, |
| 135 new LanguageChewingOptionsHandler()); | 139 new LanguageChewingOptionsHandler()); |
| 136 AddOptionsPageUIHandler(localized_strings, | 140 AddOptionsPageUIHandler(localized_strings, |
| 137 new LanguageHangulOptionsHandler()); | 141 new LanguageHangulOptionsHandler()); |
| 138 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 142 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
| 139 AddOptionsPageUIHandler(localized_strings, | 143 AddOptionsPageUIHandler(localized_strings, |
| 140 new LanguagePinyinOptionsHandler()); | 144 new LanguagePinyinOptionsHandler()); |
| 141 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); | 145 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); |
| 142 #endif | 146 #endif |
| (...skipping 25 matching lines...) Expand all Loading... |
| 168 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); | 172 (static_cast<OptionsPageUIHandler*>(*iter))->Initialize(); |
| 169 } | 173 } |
| 170 } | 174 } |
| 171 | 175 |
| 172 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, | 176 void OptionsUI::AddOptionsPageUIHandler(DictionaryValue* localized_strings, |
| 173 OptionsPageUIHandler* handler) { | 177 OptionsPageUIHandler* handler) { |
| 174 DCHECK(handler); | 178 DCHECK(handler); |
| 175 handler->GetLocalizedValues(localized_strings); | 179 handler->GetLocalizedValues(localized_strings); |
| 176 AddMessageHandler(handler->Attach(this)); | 180 AddMessageHandler(handler->Attach(this)); |
| 177 } | 181 } |
| OLD | NEW |