| 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 14 matching lines...) Expand all Loading... |
| 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/password_manager_handler.h" | 33 #include "chrome/browser/ui/webui/options/password_manager_handler.h" |
| 34 #include "chrome/browser/ui/webui/options/personal_options_handler.h" | 34 #include "chrome/browser/ui/webui/options/personal_options_handler.h" |
| 35 #include "chrome/browser/ui/webui/options/profiles_delete_handler.h" |
| 36 #include "chrome/browser/ui/webui/options/profiles_manage_handler.h" |
| 35 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" | 37 #include "chrome/browser/ui/webui/options/search_engine_manager_handler.h" |
| 36 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" | 38 #include "chrome/browser/ui/webui/options/stop_syncing_handler.h" |
| 37 #include "chrome/browser/ui/webui/options/sync_setup_handler.h" | 39 #include "chrome/browser/ui/webui/options/sync_setup_handler.h" |
| 38 #include "chrome/browser/ui/webui/theme_source.h" | 40 #include "chrome/browser/ui/webui/theme_source.h" |
| 39 #include "chrome/common/jstemplate_builder.h" | 41 #include "chrome/common/jstemplate_builder.h" |
| 40 #include "chrome/common/time_format.h" | 42 #include "chrome/common/time_format.h" |
| 41 #include "chrome/common/url_constants.h" | 43 #include "chrome/common/url_constants.h" |
| 42 #include "content/browser/browser_thread.h" | 44 #include "content/browser/browser_thread.h" |
| 43 #include "content/browser/renderer_host/render_view_host.h" | 45 #include "content/browser/renderer_host/render_view_host.h" |
| 44 #include "content/browser/tab_contents/tab_contents.h" | 46 #include "content/browser/tab_contents/tab_contents.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 229 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
| 228 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 230 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
| 229 #if defined(OS_CHROMEOS) | 231 #if defined(OS_CHROMEOS) |
| 230 AddOptionsPageUIHandler(localized_strings, | 232 AddOptionsPageUIHandler(localized_strings, |
| 231 new chromeos::CrosLanguageOptionsHandler()); | 233 new chromeos::CrosLanguageOptionsHandler()); |
| 232 #else | 234 #else |
| 233 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 235 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
| 234 #endif | 236 #endif |
| 235 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 237 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
| 236 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); | 238 AddOptionsPageUIHandler(localized_strings, new PersonalOptionsHandler()); |
| 239 AddOptionsPageUIHandler(localized_strings, new ProfilesDeleteHandler()); |
| 240 AddOptionsPageUIHandler(localized_strings, new ProfilesManageHandler()); |
| 237 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 241 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
| 238 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); | 242 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); |
| 239 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); | 243 AddOptionsPageUIHandler(localized_strings, new StopSyncingHandler()); |
| 240 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler()); | 244 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler()); |
| 241 #if defined(OS_CHROMEOS) | 245 #if defined(OS_CHROMEOS) |
| 242 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler()); | 246 AddOptionsPageUIHandler(localized_strings, new AboutPageHandler()); |
| 243 AddOptionsPageUIHandler(localized_strings, | 247 AddOptionsPageUIHandler(localized_strings, |
| 244 new chromeos::AccountsOptionsHandler()); | 248 new chromeos::AccountsOptionsHandler()); |
| 245 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); | 249 AddOptionsPageUIHandler(localized_strings, new InternetOptionsHandler()); |
| 246 AddOptionsPageUIHandler(localized_strings, | 250 AddOptionsPageUIHandler(localized_strings, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 OptionsPageUIHandler* handler_raw) { | 354 OptionsPageUIHandler* handler_raw) { |
| 351 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); | 355 scoped_ptr<OptionsPageUIHandler> handler(handler_raw); |
| 352 DCHECK(handler.get()); | 356 DCHECK(handler.get()); |
| 353 // Add only if handler's service is enabled. | 357 // Add only if handler's service is enabled. |
| 354 if (handler->IsEnabled()) { | 358 if (handler->IsEnabled()) { |
| 355 handler->GetLocalizedValues(localized_strings); | 359 handler->GetLocalizedValues(localized_strings); |
| 356 // Add handler to the list and also pass the ownership. | 360 // Add handler to the list and also pass the ownership. |
| 357 AddMessageHandler(handler.release()->Attach(this)); | 361 AddMessageHandler(handler.release()->Attach(this)); |
| 358 } | 362 } |
| 359 } | 363 } |
| OLD | NEW |