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

Unified Diff: chrome/browser/resources/settings/device_page/power.html

Issue 2853113004: chromeos: Add settings to control power management prefs. (Closed)
Patch Set: fix async call Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/device_page/power.html
diff --git a/chrome/browser/resources/settings/device_page/power.html b/chrome/browser/resources/settings/device_page/power.html
index 9250dfc59cbffb3e3db0e3adbf7b12541cd24fc3..25809a13ea5077ec515f10c4c5492e944e32abea 100644
--- a/chrome/browser/resources/settings/device_page/power.html
+++ b/chrome/browser/resources/settings/device_page/power.html
@@ -1,5 +1,6 @@
<link rel="import" href="chrome://resources/html/polymer.html">
+<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_indicator.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/html/md_select_css.html">
@@ -35,6 +36,46 @@
[[powerSourceName_]]
</div>
</div>
+
+ <div class="settings-box">
+ <div class="start">$i18n{powerIdleLabel}</div>
hcarmona 2017/06/19 22:18:11 Consider giving this element and ID and using aria
Daniel Erat 2017/06/19 23:11:21 i've tried this (see next patch set), but i always
+ <template is="dom-if" if="[[idleControlled_]]" restamp>
+ <cr-policy-indicator id="idleControlledIndicator"
hcarmona 2017/06/19 22:18:11 Please set the icon-aria-label property for a11y.
Daniel Erat 2017/06/19 23:11:21 Done.
+ indicator-type="devicePolicy">
+ </cr-policy-indicator>
+ </template>
+ <div class="md-select-wrapper">
+ <select id="idleSelect" class="md-select"
+ on-change="onIdleSelectChange_" aria-label="$i18n{powerIdleLabel}"
+ disabled="[[idleControlled_]]">
+ <template is="dom-repeat" items="[[idleOptions_]]">
+ <option value="[[item.value]]">[[item.name]]</option>
+ </template>
+ </select>
+ <span class="md-select-underline"></span>
+ </div>
+ </div>
+
+ <div id="lidClosedRow" class="settings-box continuation"
hcarmona 2017/06/19 22:18:11 Same a11y suggestions for the children of this ele
Daniel Erat 2017/06/19 23:11:21 Done.
+ hidden$="[[!hasLid_]]">
michaelpg 2017/06/19 22:38:06 nit: 4-space indent
Daniel Erat 2017/06/19 23:11:21 Done.
+ <div class="start">$i18n{powerLidClosedLabel}</div>
+ <template is="dom-if" if="[[lidClosedControlled_]]" restamp>
+ <cr-policy-indicator id="lidClosedControlledIndicator"
+ indicator-type="devicePolicy">
+ </cr-policy-indicator>
+ </template>
+ <div class="md-select-wrapper">
+ <select id="lidClosedSelect" class="md-select"
+ on-change="onLidClosedSelectChange_"
+ aria-label="$i18n{powerLidClosedLabel}"
+ disabled="[[lidClosedControlled_]]">
+ <template is="dom-repeat" items="[[lidClosedOptions_]]">
+ <option value="[[item.value]]">[[item.name]]</option>
+ </template>
+ </select>
+ <span class="md-select-underline"></span>
+ </div>
+ </div>
</template>
<script src="power.js"></script>
</dom-module>

Powered by Google App Engine
This is Rietveld 408576698