| 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 <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "content/public/browser/web_contents_delegate.h" | 66 #include "content/public/browser/web_contents_delegate.h" |
| 67 #include "content/public/browser/web_ui.h" | 67 #include "content/public/browser/web_ui.h" |
| 68 #include "net/base/escape.h" | 68 #include "net/base/escape.h" |
| 69 #include "ui/base/l10n/l10n_util.h" | 69 #include "ui/base/l10n/l10n_util.h" |
| 70 #include "ui/base/resource/resource_bundle.h" | 70 #include "ui/base/resource/resource_bundle.h" |
| 71 #include "ui/base/template_expressions.h" | 71 #include "ui/base/template_expressions.h" |
| 72 #include "ui/base/webui/jstemplate_builder.h" | 72 #include "ui/base/webui/jstemplate_builder.h" |
| 73 #include "ui/base/webui/web_ui_util.h" | 73 #include "ui/base/webui/web_ui_util.h" |
| 74 #include "url/gurl.h" | 74 #include "url/gurl.h" |
| 75 | 75 |
| 76 #if defined(ENABLE_SUPERVISED_USERS) | 76 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 77 #include "chrome/browser/ui/webui/options/supervised_user_create_confirm_handler
.h" | 77 #include "chrome/browser/ui/webui/options/supervised_user_create_confirm_handler
.h" |
| 78 #include "chrome/browser/ui/webui/options/supervised_user_import_handler.h" | 78 #include "chrome/browser/ui/webui/options/supervised_user_import_handler.h" |
| 79 #include "chrome/browser/ui/webui/options/supervised_user_learn_more_handler.h" | 79 #include "chrome/browser/ui/webui/options/supervised_user_learn_more_handler.h" |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 #if defined(OS_CHROMEOS) | 82 #if defined(OS_CHROMEOS) |
| 83 #include "chrome/browser/browser_process_platform_part.h" | 83 #include "chrome/browser/browser_process_platform_part.h" |
| 84 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 84 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 85 #include "chrome/browser/chromeos/system/pointer_device_observer.h" | 85 #include "chrome/browser/chromeos/system/pointer_device_observer.h" |
| 86 #include "chrome/browser/ui/webui/options/chromeos/accounts_options_handler.h" | 86 #include "chrome/browser/ui/webui/options/chromeos/accounts_options_handler.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); | 384 AddOptionsPageUIHandler(localized_strings, new LanguageOptionsHandler()); |
| 385 #endif | 385 #endif |
| 386 AddOptionsPageUIHandler(localized_strings, | 386 AddOptionsPageUIHandler(localized_strings, |
| 387 new LanguageDictionaryOverlayHandler()); | 387 new LanguageDictionaryOverlayHandler()); |
| 388 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); | 388 AddOptionsPageUIHandler(localized_strings, new ManageProfileHandler()); |
| 389 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); | 389 AddOptionsPageUIHandler(localized_strings, new PasswordManagerHandler()); |
| 390 AddOptionsPageUIHandler(localized_strings, new ResetProfileSettingsHandler()); | 390 AddOptionsPageUIHandler(localized_strings, new ResetProfileSettingsHandler()); |
| 391 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); | 391 AddOptionsPageUIHandler(localized_strings, new SearchEngineManagerHandler()); |
| 392 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); | 392 AddOptionsPageUIHandler(localized_strings, new ImportDataHandler()); |
| 393 AddOptionsPageUIHandler(localized_strings, new StartupPagesHandler()); | 393 AddOptionsPageUIHandler(localized_strings, new StartupPagesHandler()); |
| 394 #if defined(ENABLE_SUPERVISED_USERS) | 394 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 395 AddOptionsPageUIHandler(localized_strings, | 395 AddOptionsPageUIHandler(localized_strings, |
| 396 new SupervisedUserCreateConfirmHandler()); | 396 new SupervisedUserCreateConfirmHandler()); |
| 397 AddOptionsPageUIHandler(localized_strings, new SupervisedUserImportHandler()); | 397 AddOptionsPageUIHandler(localized_strings, new SupervisedUserImportHandler()); |
| 398 AddOptionsPageUIHandler(localized_strings, | 398 AddOptionsPageUIHandler(localized_strings, |
| 399 new SupervisedUserLearnMoreHandler()); | 399 new SupervisedUserLearnMoreHandler()); |
| 400 #endif | 400 #endif |
| 401 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler()); | 401 AddOptionsPageUIHandler(localized_strings, new SyncSetupHandler()); |
| 402 #if defined(OS_CHROMEOS) | 402 #if defined(OS_CHROMEOS) |
| 403 AddOptionsPageUIHandler(localized_strings, | 403 AddOptionsPageUIHandler(localized_strings, |
| 404 new chromeos::options::AccountsOptionsHandler()); | 404 new chromeos::options::AccountsOptionsHandler()); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 // Add only if handler's service is enabled. | 569 // Add only if handler's service is enabled. |
| 570 if (handler->IsEnabled()) { | 570 if (handler->IsEnabled()) { |
| 571 // Add handler to the list and also pass the ownership. | 571 // Add handler to the list and also pass the ownership. |
| 572 web_ui()->AddMessageHandler(handler.release()); | 572 web_ui()->AddMessageHandler(handler.release()); |
| 573 handler_raw->GetLocalizedValues(localized_strings); | 573 handler_raw->GetLocalizedValues(localized_strings); |
| 574 handlers_.push_back(handler_raw); | 574 handlers_.push_back(handler_raw); |
| 575 } | 575 } |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace options | 578 } // namespace options |
| OLD | NEW |