| 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/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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler
.h" | 90 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler
.h" |
| 91 #include "chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h" | 91 #include "chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h" |
| 92 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" | 92 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" |
| 93 #include "chrome/browser/ui/webui/options/chromeos/display_overscan_handler.h" | 93 #include "chrome/browser/ui/webui/options/chromeos/display_overscan_handler.h" |
| 94 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" | 94 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" |
| 95 #include "chrome/browser/ui/webui/options/chromeos/keyboard_handler.h" | 95 #include "chrome/browser/ui/webui/options/chromeos/keyboard_handler.h" |
| 96 #include "chrome/browser/ui/webui/options/chromeos/pointer_handler.h" | 96 #include "chrome/browser/ui/webui/options/chromeos/pointer_handler.h" |
| 97 #include "chrome/browser/ui/webui/options/chromeos/power_handler.h" | 97 #include "chrome/browser/ui/webui/options/chromeos/power_handler.h" |
| 98 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" | 98 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" |
| 99 #include "chrome/browser/ui/webui/options/chromeos/stats_options_handler.h" | 99 #include "chrome/browser/ui/webui/options/chromeos/stats_options_handler.h" |
| 100 #include "chrome/browser/ui/webui/options/chromeos/storage_manager_handler.h" |
| 100 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" | 101 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" |
| 101 #endif | 102 #endif |
| 102 | 103 |
| 103 #if defined(USE_NSS_CERTS) | 104 #if defined(USE_NSS_CERTS) |
| 104 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" | 105 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" |
| 105 #endif | 106 #endif |
| 106 | 107 |
| 107 #if BUILDFLAG(ENABLE_GOOGLE_NOW) | 108 #if BUILDFLAG(ENABLE_GOOGLE_NOW) |
| 108 #include "chrome/browser/ui/webui/options/geolocation_options_handler.h" | 109 #include "chrome/browser/ui/webui/options/geolocation_options_handler.h" |
| 109 #endif | 110 #endif |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 new chromeos::options::PointerHandler(); | 335 new chromeos::options::PointerHandler(); |
| 335 AddOptionsPageUIHandler(localized_strings, pointer_handler); | 336 AddOptionsPageUIHandler(localized_strings, pointer_handler); |
| 336 | 337 |
| 337 AddOptionsPageUIHandler(localized_strings, | 338 AddOptionsPageUIHandler(localized_strings, |
| 338 new chromeos::options::ProxyHandler()); | 339 new chromeos::options::ProxyHandler()); |
| 339 AddOptionsPageUIHandler( | 340 AddOptionsPageUIHandler( |
| 340 localized_strings, | 341 localized_strings, |
| 341 new chromeos::options::ChangePictureOptionsHandler()); | 342 new chromeos::options::ChangePictureOptionsHandler()); |
| 342 AddOptionsPageUIHandler(localized_strings, | 343 AddOptionsPageUIHandler(localized_strings, |
| 343 new chromeos::options::StatsOptionsHandler()); | 344 new chromeos::options::StatsOptionsHandler()); |
| 345 AddOptionsPageUIHandler(localized_strings, |
| 346 new chromeos::options::StorageManagerHandler()); |
| 344 | 347 |
| 345 policy::ConsumerManagementService* consumer_management = | 348 policy::ConsumerManagementService* consumer_management = |
| 346 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> | 349 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
| 347 GetConsumerManagementService(); | 350 GetConsumerManagementService(); |
| 348 chromeos::options::ConsumerManagementHandler* consumer_management_handler = | 351 chromeos::options::ConsumerManagementHandler* consumer_management_handler = |
| 349 new chromeos::options::ConsumerManagementHandler(consumer_management); | 352 new chromeos::options::ConsumerManagementHandler(consumer_management); |
| 350 AddOptionsPageUIHandler(localized_strings, consumer_management_handler); | 353 AddOptionsPageUIHandler(localized_strings, consumer_management_handler); |
| 351 #endif | 354 #endif |
| 352 #if defined(USE_NSS_CERTS) | 355 #if defined(USE_NSS_CERTS) |
| 353 AddOptionsPageUIHandler(localized_strings, | 356 AddOptionsPageUIHandler(localized_strings, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 // Add only if handler's service is enabled. | 495 // Add only if handler's service is enabled. |
| 493 if (handler->IsEnabled()) { | 496 if (handler->IsEnabled()) { |
| 494 // Add handler to the list and also pass the ownership. | 497 // Add handler to the list and also pass the ownership. |
| 495 web_ui()->AddMessageHandler(handler.release()); | 498 web_ui()->AddMessageHandler(handler.release()); |
| 496 handler_raw->GetLocalizedValues(localized_strings); | 499 handler_raw->GetLocalizedValues(localized_strings); |
| 497 handlers_.push_back(handler_raw); | 500 handlers_.push_back(handler_raw); |
| 498 } | 501 } |
| 499 } | 502 } |
| 500 | 503 |
| 501 } // namespace options | 504 } // namespace options |
| OLD | NEW |