| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/options2/options_ui.h" | 5 #include "chrome/browser/ui/webui/options2/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 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/browser/ui/webui/options2/home_page_overlay_handler.h" | 34 #include "chrome/browser/ui/webui/options2/home_page_overlay_handler.h" |
| 35 #include "chrome/browser/ui/webui/options2/import_data_handler.h" | 35 #include "chrome/browser/ui/webui/options2/import_data_handler.h" |
| 36 #include "chrome/browser/ui/webui/options2/language_options_handler.h" | 36 #include "chrome/browser/ui/webui/options2/language_options_handler.h" |
| 37 #include "chrome/browser/ui/webui/options2/manage_profile_handler.h" | 37 #include "chrome/browser/ui/webui/options2/manage_profile_handler.h" |
| 38 #include "chrome/browser/ui/webui/options2/media_galleries_handler.h" | 38 #include "chrome/browser/ui/webui/options2/media_galleries_handler.h" |
| 39 #include "chrome/browser/ui/webui/options2/options_sync_setup_handler.h" | 39 #include "chrome/browser/ui/webui/options2/options_sync_setup_handler.h" |
| 40 #include "chrome/browser/ui/webui/options2/password_manager_handler.h" | 40 #include "chrome/browser/ui/webui/options2/password_manager_handler.h" |
| 41 #include "chrome/browser/ui/webui/options2/search_engine_manager_handler.h" | 41 #include "chrome/browser/ui/webui/options2/search_engine_manager_handler.h" |
| 42 #include "chrome/browser/ui/webui/options2/startup_pages_handler.h" | 42 #include "chrome/browser/ui/webui/options2/startup_pages_handler.h" |
| 43 #include "chrome/browser/ui/webui/options2/web_intents_settings_handler.h" | 43 #include "chrome/browser/ui/webui/options2/web_intents_settings_handler.h" |
| 44 #include "chrome/browser/ui/webui/options2/web_intents_defaults_handler.h" |
| 44 #include "chrome/browser/ui/webui/theme_source.h" | 45 #include "chrome/browser/ui/webui/theme_source.h" |
| 45 #include "chrome/common/jstemplate_builder.h" | 46 #include "chrome/common/jstemplate_builder.h" |
| 46 #include "chrome/common/time_format.h" | 47 #include "chrome/common/time_format.h" |
| 47 #include "chrome/common/url_constants.h" | 48 #include "chrome/common/url_constants.h" |
| 48 #include "content/public/browser/browser_thread.h" | 49 #include "content/public/browser/browser_thread.h" |
| 49 #include "content/public/browser/notification_types.h" | 50 #include "content/public/browser/notification_types.h" |
| 50 #include "content/public/browser/render_view_host.h" | 51 #include "content/public/browser/render_view_host.h" |
| 51 #include "content/public/browser/web_contents.h" | 52 #include "content/public/browser/web_contents.h" |
| 52 #include "content/public/browser/web_contents_delegate.h" | 53 #include "content/public/browser/web_contents_delegate.h" |
| 53 #include "content/public/browser/web_ui.h" | 54 #include "content/public/browser/web_ui.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 BrowserOptionsHandler* browser_options_handler = new BrowserOptionsHandler(); | 231 BrowserOptionsHandler* browser_options_handler = new BrowserOptionsHandler(); |
| 231 AddOptionsPageUIHandler(localized_strings, browser_options_handler); | 232 AddOptionsPageUIHandler(localized_strings, browser_options_handler); |
| 232 | 233 |
| 233 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); | 234 AddOptionsPageUIHandler(localized_strings, new ClearBrowserDataHandler()); |
| 234 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); | 235 AddOptionsPageUIHandler(localized_strings, new ContentSettingsHandler()); |
| 235 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); | 236 AddOptionsPageUIHandler(localized_strings, new CookiesViewHandler()); |
| 236 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); | 237 AddOptionsPageUIHandler(localized_strings, new FontSettingsHandler()); |
| 237 AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler()); | 238 AddOptionsPageUIHandler(localized_strings, new HomePageOverlayHandler()); |
| 238 AddOptionsPageUIHandler(localized_strings, new MediaGalleriesHandler()); | 239 AddOptionsPageUIHandler(localized_strings, new MediaGalleriesHandler()); |
| 239 AddOptionsPageUIHandler(localized_strings, new WebIntentsSettingsHandler()); | 240 AddOptionsPageUIHandler(localized_strings, new WebIntentsSettingsHandler()); |
| 241 AddOptionsPageUIHandler(localized_strings, new WebIntentsDefaultsHandler()); |
| 240 #if defined(OS_CHROMEOS) | 242 #if defined(OS_CHROMEOS) |
| 241 AddOptionsPageUIHandler(localized_strings, | 243 AddOptionsPageUIHandler(localized_strings, |
| 242 new chromeos::options2::CrosLanguageOptionsHandler()); | 244 new chromeos::options2::CrosLanguageOptionsHandler()); |
| 243 #else | 245 #else |
| 244 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 246 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
| 245 #endif | 247 #endif |
| 246 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); | 248 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); |
| 247 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 249 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
| 248 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 250 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
| 249 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); | 251 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // Add only if handler's service is enabled. | 389 // Add only if handler's service is enabled. |
| 388 if (handler->IsEnabled()) { | 390 if (handler->IsEnabled()) { |
| 389 // Add handler to the list and also pass the ownership. | 391 // Add handler to the list and also pass the ownership. |
| 390 web_ui()->AddMessageHandler(handler.release()); | 392 web_ui()->AddMessageHandler(handler.release()); |
| 391 handler_raw->GetLocalizedValues(localized_strings); | 393 handler_raw->GetLocalizedValues(localized_strings); |
| 392 handlers_.push_back(handler_raw); | 394 handlers_.push_back(handler_raw); |
| 393 } | 395 } |
| 394 } | 396 } |
| 395 | 397 |
| 396 } // namespace options2 | 398 } // namespace options2 |
| OLD | NEW |