| Index: chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| diff --git a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| index 4a3f62c2a6335aa83d24a52d5122ed4757ab7a75..0f7ed4dbc8dfc6cc859e6ada503cfb3b4c3047db 100644
|
| --- a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| +++ b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.js
|
| @@ -3,6 +3,36 @@
|
| // found in the LICENSE file.
|
|
|
| /** @fileoverview A helper object used for testing the Device page. */
|
| +cr.exportPath('settings');
|
| +
|
| +/**
|
| + * Mirrors DeviceType from ash/common/system/chromeos/power/power_status.h.
|
| + * @enum {number}
|
| + */
|
| +settings.PowerDeviceType = {
|
| + DEDICATED_CHARGER: 0,
|
| + DUAL_ROLE_USB: 1,
|
| +};
|
| +
|
| +/**
|
| + * @typedef {{
|
| + * id: string,
|
| + * type: settings.PowerDeviceType,
|
| + * description: string
|
| + * }}
|
| + */
|
| +settings.PowerSource;
|
| +
|
| +/**
|
| + * @typedef {{
|
| + * charging: boolean,
|
| + * calculating: boolean,
|
| + * percent: number,
|
| + * statusText: string,
|
| + * }}
|
| + */
|
| +settings.BatteryStatus;
|
| +
|
| cr.define('settings', function() {
|
| /** @interface */
|
| function DevicePageBrowserProxy() {}
|
| @@ -23,6 +53,16 @@ cr.define('settings', function() {
|
|
|
| /** Shows the Ash keyboard shortcuts overlay. */
|
| showKeyboardShortcutsOverlay: function() {},
|
| +
|
| + /** Requests a power status update. */
|
| + updatePowerStatus: function() {},
|
| +
|
| + /**
|
| + * Sets the ID of the power source to use.
|
| + * @param {string} powerSourceId ID of the power source. '' denotes the
|
| + * battery (no external power source).
|
| + */
|
| + setPowerSource: function(powerSourceId) {},
|
| };
|
|
|
| /**
|
| @@ -55,6 +95,16 @@ cr.define('settings', function() {
|
| showKeyboardShortcutsOverlay: function() {
|
| chrome.send('showKeyboardShortcutsOverlay');
|
| },
|
| +
|
| + /** @override */
|
| + updatePowerStatus: function() {
|
| + chrome.send('updatePowerStatus');
|
| + },
|
| +
|
| + /** @override */
|
| + setPowerSource: function(powerSourceId) {
|
| + chrome.send('setPowerSource', [powerSourceId]);
|
| + },
|
| };
|
|
|
| return {
|
|
|