No dual_mode on Win10+ shortcuts.
[chromium-blink-merge.git] / chrome / browser / resources / options / chromeos / power_overlay.js
blob55e790ea1a59eab107e98a3be80d69fe6629910d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 cr.define('options', function() {
6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager;
9 /**
10 * Encapsulated handling of the power overlay.
11 * @constructor
12 * @extends {cr.ui.pageManager.Page}
14 function PowerOverlay() {
15 Page.call(this, 'power-overlay',
16 loadTimeData.getString('powerOverlayTabTitle'),
17 'power-overlay');
20 cr.addSingletonGetter(PowerOverlay);
22 PowerOverlay.prototype = {
23 __proto__: Page.prototype,
25 /** @override */
26 initializePage: function() {
27 Page.prototype.initializePage.call(this);
29 $('power-confirm').onclick =
30 PageManager.closeOverlay.bind(PageManager);
33 setBatteryStatusText_: function(status) {
34 $('battery-status-value').textContent = status;
38 PowerOverlay.setBatteryStatusText = function(value) {
39 PowerOverlay.getInstance().setBatteryStatusText_(value);
42 // Export
43 return {
44 PowerOverlay: PowerOverlay
46 });