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;
10 * Encapsulated handling of the power overlay.
12 * @extends {cr.ui.pageManager.Page}
14 function PowerOverlay() {
15 Page.call(this, 'power-overlay',
16 loadTimeData.getString('powerOverlayTabTitle'),
20 cr.addSingletonGetter(PowerOverlay);
22 PowerOverlay.prototype = {
23 __proto__: Page.prototype,
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);
44 PowerOverlay: PowerOverlay