Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 2853113004: chromeos: Add settings to control power management prefs. (Closed)
Patch Set: address review comments and display more lid-closed actions Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 AddLocalizedStringsBulk(html_source, storage_strings, 704 AddLocalizedStringsBulk(html_source, storage_strings,
705 arraysize(storage_strings)); 705 arraysize(storage_strings));
706 706
707 LocalizedString power_strings[] = { 707 LocalizedString power_strings[] = {
708 {"powerTitle", IDS_SETTINGS_POWER_TITLE}, 708 {"powerTitle", IDS_SETTINGS_POWER_TITLE},
709 {"powerSourceLabel", IDS_SETTINGS_POWER_SOURCE_LABEL}, 709 {"powerSourceLabel", IDS_SETTINGS_POWER_SOURCE_LABEL},
710 {"powerSourceBattery", IDS_SETTINGS_POWER_SOURCE_BATTERY}, 710 {"powerSourceBattery", IDS_SETTINGS_POWER_SOURCE_BATTERY},
711 {"powerSourceAcAdapter", IDS_SETTINGS_POWER_SOURCE_AC_ADAPTER}, 711 {"powerSourceAcAdapter", IDS_SETTINGS_POWER_SOURCE_AC_ADAPTER},
712 {"powerSourceLowPowerCharger", 712 {"powerSourceLowPowerCharger",
713 IDS_SETTINGS_POWER_SOURCE_LOW_POWER_CHARGER}, 713 IDS_SETTINGS_POWER_SOURCE_LOW_POWER_CHARGER},
714 {"calculatingPower", IDS_SETTINGS_POWER_SOURCE_CALCULATING}}; 714 {"calculatingPower", IDS_SETTINGS_POWER_SOURCE_CALCULATING},
715 {"powerIdleLabel", IDS_SETTINGS_POWER_IDLE_LABEL},
716 {"powerIdleDisplayOffSleep", IDS_SETTINGS_POWER_IDLE_DISPLAY_OFF_SLEEP},
717 {"powerIdleDisplayOffStayAwake",
718 IDS_SETTINGS_POWER_IDLE_DISPLAY_OFF_STAY_AWAKE},
719 {"powerIdleDisplayOn", IDS_SETTINGS_POWER_IDLE_DISPLAY_ON},
720 {"powerIdleOther", IDS_SETTINGS_POWER_IDLE_OTHER},
721 {"powerLidClosedLabel", IDS_SETTINGS_POWER_LID_CLOSED_LABEL},
722 {"powerLidClosedSleep", IDS_SETTINGS_POWER_LID_CLOSED_SLEEP},
723 {"powerLidClosedStayAwake", IDS_SETTINGS_POWER_LID_CLOSED_STAY_AWAKE},
724 {"powerLidClosedSignOut", IDS_SETTINGS_POWER_LID_CLOSED_SIGN_OUT},
725 {"powerLidClosedShutDown", IDS_SETTINGS_POWER_LID_CLOSED_SHUT_DOWN},
726 };
715 AddLocalizedStringsBulk(html_source, power_strings, arraysize(power_strings)); 727 AddLocalizedStringsBulk(html_source, power_strings, arraysize(power_strings));
716 728
717 html_source->AddString("naturalScrollLearnMoreLink", 729 html_source->AddString("naturalScrollLearnMoreLink",
718 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL)); 730 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL));
719 } 731 }
720 #endif 732 #endif
721 733
722 void AddDownloadsStrings(content::WebUIDataSource* html_source) { 734 void AddDownloadsStrings(content::WebUIDataSource* html_source) {
723 LocalizedString localized_strings[] = { 735 LocalizedString localized_strings[] = {
724 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS}, 736 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS},
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 2083
2072 #if defined(OS_CHROMEOS) 2084 #if defined(OS_CHROMEOS)
2073 chromeos::network_element::AddLocalizedStrings(html_source); 2085 chromeos::network_element::AddLocalizedStrings(html_source);
2074 #endif 2086 #endif
2075 policy_indicator::AddLocalizedStrings(html_source); 2087 policy_indicator::AddLocalizedStrings(html_source);
2076 2088
2077 html_source->SetJsonPath(kLocalizedStringsFile); 2089 html_source->SetJsonPath(kLocalizedStringsFile);
2078 } 2090 }
2079 2091
2080 } // namespace settings 2092 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698