Chromium Code Reviews| Index: chrome/browser/resources/settings/device_page/device_page.js |
| diff --git a/chrome/browser/resources/settings/device_page/device_page.js b/chrome/browser/resources/settings/device_page/device_page.js |
| index ab3ad88c5f30e4670f04179cd4ad12f5144b0438..cc9ae2f9d4ad944b7abec2e0568a88f3f35e803a 100644 |
| --- a/chrome/browser/resources/settings/device_page/device_page.js |
| +++ b/chrome/browser/resources/settings/device_page/device_page.js |
| @@ -28,19 +28,19 @@ Polymer({ |
| */ |
| hasMouse_: { |
| type: Boolean, |
| - value: false |
| + value: false, |
|
michaelpg
2017/03/01 23:39:12
(just make sure this gets rebased correctly to avo
Daniel Erat
2017/03/02 00:17:46
thanks for the heads-up.
|
| }, |
| /** @private */ |
| hasTouchpad_: { |
| type: Boolean, |
| - value: false |
| + value: false, |
| }, |
| /** @private */ |
| hasStylus_: { |
| type: Boolean, |
| - value: false |
| + value: false, |
| }, |
| /** |
| @@ -54,43 +54,6 @@ Polymer({ |
| }, |
| readOnly: true, |
| }, |
| - |
| - /** @private {string} ID of the selected power source, or ''. */ |
| - selectedPowerSourceId_: String, |
| - |
| - /** @private {!settings.BatteryStatus|undefined} */ |
| - batteryStatus_: Object, |
| - |
| - /** @private {boolean} Whether a low-power (USB) charger is being used. */ |
| - lowPowerCharger_: Boolean, |
| - |
| - /** |
| - * List of available dual-role power sources, if enablePowerSettings_ is on. |
| - * @private {!Array<!settings.PowerSource>|undefined} |
| - */ |
| - powerSources_: Array, |
| - |
| - /** @private */ |
| - powerLabel_: { |
| - type: String, |
| - computed: 'computePowerLabel_(powerSources_, batteryStatus_.calculating)', |
| - }, |
| - |
| - /** @private */ |
| - showPowerDropdown_: { |
| - type: Boolean, |
| - computed: 'computeShowPowerDropdown_(powerSources_)', |
| - value: false, |
| - }, |
| - |
| - /** |
| - * The name of the dedicated charging device being used, if present. |
| - * @private {string} |
| - */ |
| - powerSourceName_: { |
| - type: String, |
| - computed: 'computePowerSourceName_(powerSources_, lowPowerCharger_)', |
| - }, |
| }, |
| observers: [ |
| @@ -108,14 +71,6 @@ Polymer({ |
| this.addWebUIListener( |
| 'has-stylus-changed', this.set.bind(this, 'hasStylus_')); |
| settings.DevicePageBrowserProxyImpl.getInstance().initializeStylus(); |
| - |
| - if (this.enablePowerSettings_) { |
| - this.addWebUIListener( |
| - 'battery-status-changed', this.set.bind(this, 'batteryStatus_')); |
| - this.addWebUIListener( |
| - 'power-sources-changed', this.powerSourcesChanged_.bind(this)); |
| - settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); |
| - } |
| }, |
| /** |
| @@ -133,52 +88,6 @@ Polymer({ |
| }, |
| /** |
| - * @param {*} lhs |
| - * @param {*} rhs |
| - * @return {boolean} |
| - */ |
| - isEqual_: function(lhs, rhs) { |
| - return lhs === rhs; |
| - }, |
| - |
| - /** |
| - * @param {!Array<!settings.PowerSource>|undefined} powerSources |
| - * @param {boolean} calculating |
| - * @return {string} The primary label for the power row. |
| - * @private |
| - */ |
| - computePowerLabel_: function(powerSources, calculating) { |
| - return this.i18n(calculating ? 'calculatingPower' : |
| - powerSources.length ? 'powerSourceLabel' : 'powerSourceBattery'); |
| - }, |
| - |
| - /** |
| - * @param {!Array<!settings.PowerSource>} powerSources |
| - * @return {boolean} True if at least one power source is attached and all of |
| - * them are dual-role (no dedicated chargers). |
| - * @private |
| - */ |
| - computeShowPowerDropdown_: function(powerSources) { |
| - return powerSources.length > 0 && powerSources.every(function(source) { |
| - return source.type == settings.PowerDeviceType.DUAL_ROLE_USB; |
| - }); |
| - }, |
| - |
| - /** |
| - * @param {!Array<!settings.PowerSource>} powerSources |
| - * @param {boolean} lowPowerCharger |
| - * @return {string} Description of the power source. |
| - * @private |
| - */ |
| - computePowerSourceName_: function (powerSources, lowPowerCharger) { |
| - if (lowPowerCharger) |
| - return this.i18n('powerSourceLowPowerCharger'); |
| - if (powerSources.length) |
| - return this.i18n('powerSourceAcAdapter'); |
| - return ''; |
| - }, |
| - |
| - /** |
| * Handler for tapping the mouse and touchpad settings menu item. |
| * @private |
| */ |
| @@ -218,9 +127,12 @@ Polymer({ |
| settings.navigateTo(settings.Route.STORAGE); |
| }, |
| - onPowerSourceChange_: function() { |
| - settings.DevicePageBrowserProxyImpl.getInstance().setPowerSource( |
| - this.$$('#powerSource').value); |
| + /** |
| + * Handler for tapping the Power settings menu item. |
| + * @private |
| + */ |
| + onPowerTap_: function() { |
| + settings.navigateTo(settings.Route.POWER); |
| }, |
| /** @protected */ |
| @@ -239,19 +151,6 @@ Polymer({ |
| }, |
| /** |
| - * @param {!Array<settings.PowerSource>} sources External power sources. |
| - * @param {string} selectedId The ID of the currently used power source. |
| - * @param {boolean} lowPowerCharger Whether the currently used power source |
| - * is a low-powered USB charger. |
| - * @private |
| - */ |
| - powerSourcesChanged_: function(sources, selectedId, lowPowerCharger) { |
| - this.powerSources_ = sources; |
| - this.selectedPowerSourceId_ = selectedId; |
| - this.lowPowerCharger_ = lowPowerCharger; |
| - }, |
| - |
| - /** |
| * Leaves the pointer subpage if all pointing devices are detached. |
| * @private |
| */ |