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/ui/webui/options/options_ui.h" | 5 #include "chrome/browser/ui/webui/options/options_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/ui/webui/options/advanced_options_handler.h" | 21 #include "chrome/browser/ui/webui/options/advanced_options_handler.h" |
22 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" | 22 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" |
23 #include "chrome/browser/ui/webui/options/browser_options_handler.h" | 23 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
24 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" | 24 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" |
25 #include "chrome/browser/ui/webui/options/content_settings_handler.h" | 25 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
26 #include "chrome/browser/ui/webui/options/handler_options_handler.h" | 26 #include "chrome/browser/ui/webui/options/handler_options_handler.h" |
27 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" | 27 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" |
28 #include "chrome/browser/ui/webui/options/core_options_handler.h" | 28 #include "chrome/browser/ui/webui/options/core_options_handler.h" |
29 #include "chrome/browser/ui/webui/options/font_settings_handler.h" | 29 #include "chrome/browser/ui/webui/options/font_settings_handler.h" |
30 #include "chrome/browser/ui/webui/options/import_data_handler.h" | 30 #include "chrome/browser/ui/webui/options/import_data_handler.h" |
31 #include "chrome/browser/ui/webui/options/intents_settings_handler.h" | |
32 #include "chrome/browser/ui/webui/options/language_options_handler.h" | 31 #include "chrome/browser/ui/webui/options/language_options_handler.h" |
33 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" | 32 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" |
34 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" | 33 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" |
35 #include "chrome/browser/ui/webui/options/password_manager_handler.h" | 34 #include "chrome/browser/ui/webui/options/password_manager_handler.h" |
36 #include "chrome/browser/ui/webui/options/personal_options_handler.h" | 35 #include "chrome/browser/ui/webui/options/personal_options_handler.h" |
37 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" | 36 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" |
38 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" | 37 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" |
39 #include "chrome/browser/ui/webui/theme_source.h" | 38 #include "chrome/browser/ui/webui/theme_source.h" |
40 #include "chrome/common/jstemplate_builder.h" | 39 #include "chrome/common/jstemplate_builder.h" |
41 #include "chrome/common/time_format.h" | 40 #include "chrome/common/time_format.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 core_handler->set_handlers_host(this); | 203 core_handler->set_handlers_host(this); |
205 AddOptionsPageUIHandler(localized_strings, core_handler); | 204 AddOptionsPageUIHandler(localized_strings, core_handler); |
206 | 205 |
207 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); | 206 AddOptionsPageUIHandler(localized_strings, new AdvancedOptionsHandler()); |
208 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); | 207 AddOptionsPageUIHandler(localized_strings, new AutofillOptionsHandler()); |
209 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); | 208 AddOptionsPageUIHandler(localized_strings, new BrowserOptionsHandler()); |
210 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 209 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
211 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 210 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
212 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 211 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
213 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 212 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
214 AddOptionsPageUIHandler(localized_strings, new IntentsSettingsHandler()); | |
215 #if defined(OS_CHROMEOS) | 213 #if defined(OS_CHROMEOS) |
216 AddOptionsPageUIHandler(localized_strings, | 214 AddOptionsPageUIHandler(localized_strings, |
217 new chromeos::CrosLanguageOptionsHandler()); | 215 new chromeos::CrosLanguageOptionsHandler()); |
218 #else | 216 #else |
219 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 217 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
220 #endif | 218 #endif |
221 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); | 219 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); |
222 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 220 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
223 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); | 221 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); |
224 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 222 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 OptionsPageUIHandler* handler_raw) { | 339 OptionsPageUIHandler* handler_raw) { |
342 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); | 340 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); |
343 DCHECK(handler.get()); | 341 DCHECK(handler.get()); |
344 // Add only if handler's service is enabled. | 342 // Add only if handler's service is enabled. |
345 if (handler->IsEnabled()) { | 343 if (handler->IsEnabled()) { |
346 handler->GetLocalizedValues(localized_strings); | 344 handler->GetLocalizedValues(localized_strings); |
347 // Add handler to the list and also pass the ownership. | 345 // Add handler to the list and also pass the ownership. |
348 AddMessageHandler(handler.release()->Attach(this)); | 346 AddMessageHandler(handler.release()->Attach(this)); |
349 } | 347 } |
350 } | 348 } |
OLD | NEW |