| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings/md_settings_localized_strings_provide
r.h" | 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide
r.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 246 |
| 247 #if defined(OS_CHROMEOS) | 247 #if defined(OS_CHROMEOS) |
| 248 void AddAccountUITweaksStrings(content::WebUIDataSource* html_source, | 248 void AddAccountUITweaksStrings(content::WebUIDataSource* html_source, |
| 249 Profile* profile) { | 249 Profile* profile) { |
| 250 base::DictionaryValue localized_values; | 250 base::DictionaryValue localized_values; |
| 251 chromeos::AddAccountUITweaksLocalizedValues(&localized_values, profile); | 251 chromeos::AddAccountUITweaksLocalizedValues(&localized_values, profile); |
| 252 html_source->AddLocalizedStrings(localized_values); | 252 html_source->AddLocalizedStrings(localized_values); |
| 253 } | 253 } |
| 254 #endif | 254 #endif |
| 255 | 255 |
| 256 void AddAppearanceStrings(content::WebUIDataSource* html_source) { | 256 void AddAppearanceStrings(content::WebUIDataSource* html_source, |
| 257 Profile* profile) { |
| 257 LocalizedString localized_strings[] = { | 258 LocalizedString localized_strings[] = { |
| 258 {"appearancePageTitle", IDS_SETTINGS_APPEARANCE}, | 259 {"appearancePageTitle", IDS_SETTINGS_APPEARANCE}, |
| 259 {"exampleDotCom", IDS_SETTINGS_EXAMPLE_DOT_COM}, | 260 {"exampleDotCom", IDS_SETTINGS_EXAMPLE_DOT_COM}, |
| 260 {"themes", IDS_SETTINGS_THEMES}, | 261 {"themes", IDS_SETTINGS_THEMES}, |
| 261 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 262 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 262 {"systemTheme", IDS_SETTINGS_SYSTEM_THEME}, | 263 {"systemTheme", IDS_SETTINGS_SYSTEM_THEME}, |
| 263 {"useSystemTheme", IDS_SETTINGS_USE_SYSTEM_THEME}, | 264 {"useSystemTheme", IDS_SETTINGS_USE_SYSTEM_THEME}, |
| 264 {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, | 265 {"classicTheme", IDS_SETTINGS_CLASSIC_THEME}, |
| 265 {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME}, | 266 {"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME}, |
| 266 #else | 267 #else |
| (...skipping 10 matching lines...) Expand all Loading... |
| 277 #if defined(OS_CHROMEOS) | 278 #if defined(OS_CHROMEOS) |
| 278 {"openWallpaperApp", IDS_SETTINGS_OPEN_WALLPAPER_APP}, | 279 {"openWallpaperApp", IDS_SETTINGS_OPEN_WALLPAPER_APP}, |
| 279 {"setWallpaper", IDS_SETTINGS_SET_WALLPAPER}, | 280 {"setWallpaper", IDS_SETTINGS_SET_WALLPAPER}, |
| 280 #endif | 281 #endif |
| 281 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 282 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 282 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, | 283 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, |
| 283 #endif | 284 #endif |
| 284 }; | 285 }; |
| 285 AddLocalizedStringsBulk(html_source, localized_strings, | 286 AddLocalizedStringsBulk(html_source, localized_strings, |
| 286 arraysize(localized_strings)); | 287 arraysize(localized_strings)); |
| 288 |
| 289 html_source->AddBoolean("isSupervised", profile->IsSupervised()); |
| 287 } | 290 } |
| 288 | 291 |
| 289 #if defined(OS_CHROMEOS) | 292 #if defined(OS_CHROMEOS) |
| 290 void AddBluetoothStrings(content::WebUIDataSource* html_source) { | 293 void AddBluetoothStrings(content::WebUIDataSource* html_source) { |
| 291 LocalizedString localized_strings[] = { | 294 LocalizedString localized_strings[] = { |
| 292 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY}, | 295 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY}, |
| 293 {"bluetoothAddDevice", IDS_OPTIONS_SETTINGS_ADD_BLUETOOTH_DEVICE}, | 296 {"bluetoothAddDevice", IDS_OPTIONS_SETTINGS_ADD_BLUETOOTH_DEVICE}, |
| 294 {"bluetoothAddDevicePageTitle", IDS_SETTINGS_BLUETOOTH_ADD_DEVICE}, | 297 {"bluetoothAddDevicePageTitle", IDS_SETTINGS_BLUETOOTH_ADD_DEVICE}, |
| 295 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT}, | 298 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT}, |
| 296 {"bluetoothConnecting", IDS_SETTINGS_BLUETOOTH_CONNECTING}, | 299 {"bluetoothConnecting", IDS_SETTINGS_BLUETOOTH_CONNECTING}, |
| (...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 | 1690 |
| 1688 void AddLocalizedStrings(content::WebUIDataSource* html_source, | 1691 void AddLocalizedStrings(content::WebUIDataSource* html_source, |
| 1689 Profile* profile) { | 1692 Profile* profile) { |
| 1690 AddCommonStrings(html_source, profile); | 1693 AddCommonStrings(html_source, profile); |
| 1691 | 1694 |
| 1692 AddA11yStrings(html_source); | 1695 AddA11yStrings(html_source); |
| 1693 AddAboutStrings(html_source); | 1696 AddAboutStrings(html_source); |
| 1694 #if defined(OS_CHROMEOS) | 1697 #if defined(OS_CHROMEOS) |
| 1695 AddAccountUITweaksStrings(html_source, profile); | 1698 AddAccountUITweaksStrings(html_source, profile); |
| 1696 #endif | 1699 #endif |
| 1697 AddAppearanceStrings(html_source); | 1700 AddAppearanceStrings(html_source, profile); |
| 1698 #if defined(OS_CHROMEOS) | 1701 #if defined(OS_CHROMEOS) |
| 1699 AddBluetoothStrings(html_source); | 1702 AddBluetoothStrings(html_source); |
| 1700 #endif | 1703 #endif |
| 1701 #if defined(USE_NSS_CERTS) | 1704 #if defined(USE_NSS_CERTS) |
| 1702 AddCertificateManagerStrings(html_source); | 1705 AddCertificateManagerStrings(html_source); |
| 1703 #endif | 1706 #endif |
| 1704 AddClearBrowsingDataStrings(html_source); | 1707 AddClearBrowsingDataStrings(html_source); |
| 1705 #if !defined(OS_CHROMEOS) | 1708 #if !defined(OS_CHROMEOS) |
| 1706 AddDefaultBrowserStrings(html_source); | 1709 AddDefaultBrowserStrings(html_source); |
| 1707 #endif | 1710 #endif |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1735 #endif | 1738 #endif |
| 1736 AddUsersStrings(html_source); | 1739 AddUsersStrings(html_source); |
| 1737 AddWebContentStrings(html_source); | 1740 AddWebContentStrings(html_source); |
| 1738 | 1741 |
| 1739 policy_indicator::AddLocalizedStrings(html_source); | 1742 policy_indicator::AddLocalizedStrings(html_source); |
| 1740 | 1743 |
| 1741 html_source->SetJsonPath(kLocalizedStringsFile); | 1744 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1742 } | 1745 } |
| 1743 | 1746 |
| 1744 } // namespace settings | 1747 } // namespace settings |
| OLD | NEW |