| 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" | 23 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" |
| 24 #include "chrome/browser/ui/webui/options/browser_options_handler.h" | 24 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
| 25 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" | 25 #include "chrome/browser/ui/webui/options/clear_browser_data_handler.h" |
| 26 #include "chrome/browser/ui/webui/options/content_settings_handler.h" | 26 #include "chrome/browser/ui/webui/options/content_settings_handler.h" |
| 27 #include "chrome/browser/ui/webui/options/handler_options_handler.h" | 27 #include "chrome/browser/ui/webui/options/handler_options_handler.h" |
| 28 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" | 28 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" |
| 29 #include "chrome/browser/ui/webui/options/core_options_handler.h" | 29 #include "chrome/browser/ui/webui/options/core_options_handler.h" |
| 30 #include "chrome/browser/ui/webui/options/font_settings_handler.h" | 30 #include "chrome/browser/ui/webui/options/font_settings_handler.h" |
| 31 #include "chrome/browser/ui/webui/options/import_data_handler.h" | 31 #include "chrome/browser/ui/webui/options/import_data_handler.h" |
| 32 #include "chrome/browser/ui/webui/options/language_options_handler.h" | 32 #include "chrome/browser/ui/webui/options/language_options_handler.h" |
| 33 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" |
| 33 #include "chrome/browser/ui/webui/options/password_manager_handler.h" | 34 #include "chrome/browser/ui/webui/options/password_manager_handler.h" |
| 34 #include "chrome/browser/ui/webui/options/personal_options_handler.h" | 35 #include "chrome/browser/ui/webui/options/personal_options_handler.h" |
| 35 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" | 36 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" |
| 36 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" | 37 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" |
| 37 #include "chrome/browser/ui/webui/options/sync_setup_handler.h" | 38 #include "chrome/browser/ui/webui/options/sync_setup_handler.h" |
| 38 #include "chrome/browser/ui/webui/theme_source.h" | 39 #include "chrome/browser/ui/webui/theme_source.h" |
| 39 #include "chrome/common/jstemplate_builder.h" | 40 #include "chrome/common/jstemplate_builder.h" |
| 40 #include "chrome/common/time_format.h" | 41 #include "chrome/common/time_format.h" |
| 41 #include "chrome/common/url_constants.h" | 42 #include "chrome/common/url_constants.h" |
| 42 #include "content/browser/browser_thread.h" | 43 #include "content/browser/browser_thread.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 226 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
| 226 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 227 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
| 227 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 228 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
| 228 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 229 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
| 229 #if defined(OS_CHROMEOS) | 230 #if defined(OS_CHROMEOS) |
| 230 AddOptionsPageUIHandler(localized_strings, | 231 AddOptionsPageUIHandler(localized_strings, |
| 231 new chromeos::CrosLanguageOptionsHandler()); | 232 new chromeos::CrosLanguageOptionsHandler()); |
| 232 #else | 233 #else |
| 233 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 234 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
| 234 #endif | 235 #endif |
| 236 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); |
| 235 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 237 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
| 236 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); | 238 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); |
| 237 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 239 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
| 238 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); | 240 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); |
| 239 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); | 241 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); |
| 240 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler()); | 242 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler()); |
| 241 #if defined(OS_CHROMEOS) | 243 #if defined(OS_CHROMEOS) |
| 242 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler()); | 244 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler()); |
| 243 AddOptionsPageUIHandler(localized_strings, | 245 AddOptionsPageUIHandler(localized_strings, |
| 244 new chromeos::AccountsOptionsHandler()); | 246 new chromeos::AccountsOptionsHandler()); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 OptionsPageUIHandler* handler_raw) { | 352 OptionsPageUIHandler* handler_raw) { |
| 351 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); | 353 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); |
| 352 DCHECK(handler.get()); | 354 DCHECK(handler.get()); |
| 353 // Add only if handler's service is enabled. | 355 // Add only if handler's service is enabled. |
| 354 if (handler->IsEnabled()) { | 356 if (handler->IsEnabled()) { |
| 355 handler->GetLocalizedValues(localized_strings); | 357 handler->GetLocalizedValues(localized_strings); |
| 356 // Add handler to the list and also pass the ownership. | 358 // Add handler to the list and also pass the ownership. |
| 357 AddMessageHandler(handler.release()->Attach(this)); | 359 AddMessageHandler(handler.release()->Attach(this)); |
| 358 } | 360 } |
| 359 } | 361 } |
| OLD | NEW |