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

Unified Diff: chrome/browser/resources/settings/device_page/device_page.js

Issue 2675383003: MD Settings: CrOS: Elim device page icons (Closed)
Patch Set: Rebase Created 3 years, 10 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/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 23a004e28425926d8d7456fa57df93f2841254ca..ab3ad88c5f30e4670f04179cd4ad12f5144b0438 100644
--- a/chrome/browser/resources/settings/device_page/device_page.js
+++ b/chrome/browser/resources/settings/device_page/device_page.js
@@ -71,13 +71,6 @@ Polymer({
powerSources_: Array,
/** @private */
- batteryIcon_: {
- type: String,
- computed: 'computeBatteryIcon_(batteryStatus_, lowPowerCharger_)',
- value: 'settings:battery-unknown',
- },
-
- /** @private */
powerLabel_: {
type: String,
computed: 'computePowerLabel_(powerSources_, batteryStatus_.calculating)',
@@ -140,18 +133,6 @@ Polymer({
},
/**
- * @return {string}
- * @private
- */
- getPointersIcon_: function() {
- if (this.hasMouse_)
- return 'settings:mouse';
- if (this.hasTouchpad_)
- return 'settings:touch-app';
- return '';
- },
-
- /**
* @param {*} lhs
* @param {*} rhs
* @return {boolean}
@@ -161,43 +142,6 @@ Polymer({
},
/**
- * @param {!settings.BatteryStatus} batteryStatus
- * @param {boolean} lowPowerCharger
- * @return {string}
- */
- computeBatteryIcon_: function(batteryStatus, lowPowerCharger) {
- var iconPrefix = 'settings:battery-';
-
- if (batteryStatus.calculating)
- return iconPrefix + 'unknown';
-
- if (lowPowerCharger)
- return iconPrefix + 'unreliable';
-
- if (!batteryStatus.charging && batteryStatus.percent < 5)
- return iconPrefix + 'alert';
-
- // Compute the rest of the icon: iconPrefix + '[charging-]<percent>'.
- if (batteryStatus.charging)
- iconPrefix += 'charging-';
-
- // Show the highest level icon that doesn't go over the actual percentage.
- if (batteryStatus.percent < 30)
- return iconPrefix + '20';
- if (batteryStatus.percent < 50)
- return iconPrefix + '30';
- if (batteryStatus.percent < 60)
- return iconPrefix + '50';
- if (batteryStatus.percent < 80)
- return iconPrefix + '60';
- if (batteryStatus.percent < 90)
- return iconPrefix + '80';
- if (batteryStatus.percent < 100)
- return iconPrefix + '90';
- return iconPrefix + 'full';
- },
-
- /**
* @param {!Array<!settings.PowerSource>|undefined} powerSources
* @param {boolean} calculating
* @return {string} The primary label for the power row.
« no previous file with comments | « chrome/browser/resources/settings/device_page/device_page.html ('k') | chrome/browser/resources/settings/icons.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698