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/options_ui.h" | 5 #include "chrome/browser/dom_ui/options/options_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 #include "grit/browser_resources.h" | 47 #include "grit/browser_resources.h" |
48 #include "grit/chromium_strings.h" | 48 #include "grit/chromium_strings.h" |
49 #include "grit/generated_resources.h" | 49 #include "grit/generated_resources.h" |
50 #include "grit/locale_settings.h" | 50 #include "grit/locale_settings.h" |
51 #include "grit/theme_resources.h" | 51 #include "grit/theme_resources.h" |
52 | 52 |
53 #if defined(OS_CHROMEOS) | 53 #if defined(OS_CHROMEOS) |
54 #include "chrome/browser/chromeos/dom_ui/accounts_options_handler.h" | 54 #include "chrome/browser/chromeos/dom_ui/accounts_options_handler.h" |
55 #include "chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h" | 55 #include "chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h" |
| 56 #include "chrome/browser/chromeos/dom_ui/cros_personal_options_handler.h" |
56 #include "chrome/browser/chromeos/dom_ui/internet_options_handler.h" | 57 #include "chrome/browser/chromeos/dom_ui/internet_options_handler.h" |
57 #include "chrome/browser/chromeos/dom_ui/labs_handler.h" | 58 #include "chrome/browser/chromeos/dom_ui/labs_handler.h" |
58 #include "chrome/browser/chromeos/dom_ui/language_chewing_options_handler.h" | 59 #include "chrome/browser/chromeos/dom_ui/language_chewing_options_handler.h" |
59 #include "chrome/browser/chromeos/dom_ui/language_customize_modifier_keys_handle
r.h" | 60 #include "chrome/browser/chromeos/dom_ui/language_customize_modifier_keys_handle
r.h" |
60 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h" | 61 #include "chrome/browser/chromeos/dom_ui/language_hangul_options_handler.h" |
61 #include "chrome/browser/chromeos/dom_ui/language_mozc_options_handler.h" | 62 #include "chrome/browser/chromeos/dom_ui/language_mozc_options_handler.h" |
62 #include "chrome/browser/chromeos/dom_ui/language_options_handler.h" | 63 #include "chrome/browser/chromeos/dom_ui/language_options_handler.h" |
63 #include "chrome/browser/chromeos/dom_ui/language_pinyin_options_handler.h" | 64 #include "chrome/browser/chromeos/dom_ui/language_pinyin_options_handler.h" |
64 #include "chrome/browser/chromeos/dom_ui/proxy_handler.h" | 65 #include "chrome/browser/chromeos/dom_ui/proxy_handler.h" |
65 #include "chrome/browser/chromeos/dom_ui/system_options_handler.h" | 66 #include "chrome/browser/chromeos/dom_ui/system_options_handler.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 AddOptionsPageUIHandler(localized_strings, | 159 AddOptionsPageUIHandler(localized_strings, |
159 new chromeos::LanguageHangulOptionsHandler()); | 160 new chromeos::LanguageHangulOptionsHandler()); |
160 AddOptionsPageUIHandler(localized_strings, | 161 AddOptionsPageUIHandler(localized_strings, |
161 new chromeos::LanguageMozcOptionsHandler()); | 162 new chromeos::LanguageMozcOptionsHandler()); |
162 AddOptionsPageUIHandler(localized_strings, | 163 AddOptionsPageUIHandler(localized_strings, |
163 new chromeos::LanguageOptionsHandler()); | 164 new chromeos::LanguageOptionsHandler()); |
164 AddOptionsPageUIHandler(localized_strings, | 165 AddOptionsPageUIHandler(localized_strings, |
165 new chromeos::LanguagePinyinOptionsHandler()); | 166 new chromeos::LanguagePinyinOptionsHandler()); |
166 AddOptionsPageUIHandler(localized_strings, new chromeos::ProxyHandler()); | 167 AddOptionsPageUIHandler(localized_strings, new chromeos::ProxyHandler()); |
167 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); | 168 AddOptionsPageUIHandler(localized_strings, new SystemOptionsHandler()); |
| 169 AddOptionsPageUIHandler(localized_strings, |
| 170 new chromeos::CrosPersonalOptionsHandler()); |
168 #endif | 171 #endif |
169 #if defined(USE_NSS) | 172 #if defined(USE_NSS) |
170 AddOptionsPageUIHandler(localized_strings, new CertificateManagerHandler()); | 173 AddOptionsPageUIHandler(localized_strings, new CertificateManagerHandler()); |
171 #endif | 174 #endif |
172 | 175 |
173 // |localized_strings| ownership is taken over by this constructor. | 176 // |localized_strings| ownership is taken over by this constructor. |
174 OptionsUIHTMLSource* html_source = | 177 OptionsUIHTMLSource* html_source = |
175 new OptionsUIHTMLSource(localized_strings); | 178 new OptionsUIHTMLSource(localized_strings); |
176 | 179 |
177 // Set up the chrome://settings/ source. | 180 // Set up the chrome://settings/ source. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 OptionsPageUIHandler* handler_raw) { | 222 OptionsPageUIHandler* handler_raw) { |
220 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); | 223 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); |
221 DCHECK(handler.get()); | 224 DCHECK(handler.get()); |
222 // Add only if handler's service is enabled. | 225 // Add only if handler's service is enabled. |
223 if (handler->IsEnabled()) { | 226 if (handler->IsEnabled()) { |
224 handler->GetLocalizedValues(localized_strings); | 227 handler->GetLocalizedValues(localized_strings); |
225 // Add handler to the list and also pass the ownership. | 228 // Add handler to the list and also pass the ownership. |
226 AddMessageHandler(handler.release()->Attach(this)); | 229 AddMessageHandler(handler.release()->Attach(this)); |
227 } | 230 } |
228 } | 231 } |
OLD | NEW |