Commit a504a601 authored by Josiah K's avatar Josiah K Committed by Chromium LUCI CQ

[Switch Access] Clean up unused code in switch_access_subpage.js

AX-Relnotes: N/A.
Bug: 1156494
Change-Id: I99fb4980235a9be55b5c5e8674d43f0c1326899a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577734Reviewed-by: default avatarJimmy Gong <jimmyxgong@chromium.org>
Commit-Queue: Jimmy Gong <jimmyxgong@chromium.org>
Auto-Submit: Josiah Krutz <josiahk@google.com>
Cr-Commit-Position: refs/heads/master@{#835083}
parent 1b5841fa
......@@ -13,19 +13,6 @@
*/
const PREFIX = 'settings.a11y.switch_access.';
/**
* The ending of the setting name for all key code preferences.
* @const
*/
const KEY_CODE_SUFFIX = '.key_codes';
/**
* The ending of the setting name for all preferences referring to
* Switch Access command settings.
* @const
*/
const COMMAND_SUFFIX = '.setting';
/** @type {!Array<number>} */
const AUTO_SCAN_SPEED_RANGE_MS = [
700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800,
......@@ -42,21 +29,6 @@ function ticksWithLabelsInSec(ticksInMs) {
return ticksInMs.map(x => ({label: `${x / 1000}`, value: x}));
}
/**
* @param {!Array} array
* @param {*} value
* @return {!Array}
*/
function removeElementWithValue(array, value) {
for (let i = 0; i < array.length; i++) {
if (array[i].value === value) {
array.splice(i, 1);
return array;
}
}
return array;
}
Polymer({
is: 'settings-switch-access-subpage',
......@@ -264,18 +236,6 @@ Polymer({
}
},
/**
* @return {string}
* @private
*/
currentSpeed_() {
const speed = this.getPref(PREFIX + 'auto_scan.speed_ms').value;
if (typeof speed !== 'number') {
return '';
}
return this.scanSpeedStringInSec_(speed);
},
/**
* @return {boolean} Whether to show settings for auto-scan within the
* keyboard.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment