| Index: chrome/browser/resources/options/chromeos/keyboard_overlay.js
|
| diff --git a/chrome/browser/resources/options/chromeos/keyboard_overlay.js b/chrome/browser/resources/options/chromeos/keyboard_overlay.js
|
| index b18af10166e3d07f18f45a7d9880e5d5c0ade7f1..09b3954855f3fe3b5b5b0a2b3639d3c07511a50f 100644
|
| --- a/chrome/browser/resources/options/chromeos/keyboard_overlay.js
|
| +++ b/chrome/browser/resources/options/chromeos/keyboard_overlay.js
|
| @@ -11,8 +11,7 @@ cr.define('options', function() {
|
| * @type {!Array<number>}
|
| * @const
|
| */
|
| - var AUTO_REPEAT_DELAYS =
|
| - [2000, 1500, 1000, 500, 300, 200, 150];
|
| + var AUTO_REPEAT_DELAYS = [2000, 1500, 1000, 500, 300, 200, 150];
|
|
|
| /**
|
| * Auto-repeat intervals (in ms) for the corresponding slider values, from
|
| @@ -21,8 +20,7 @@ cr.define('options', function() {
|
| * @type {!Array<number>}
|
| * @const
|
| */
|
| - var AUTO_REPEAT_INTERVALS =
|
| - [2000, 1000, 500, 300, 200, 100, 50, 30, 20];
|
| + var AUTO_REPEAT_INTERVALS = [2000, 1000, 500, 300, 200, 100, 50, 30, 20];
|
|
|
| /**
|
| * Encapsulated handling of the keyboard overlay.
|
| @@ -30,9 +28,9 @@ cr.define('options', function() {
|
| * @extends {options.SettingsDialog}
|
| */
|
| function KeyboardOverlay() {
|
| - options.SettingsDialog.call(this, 'keyboard-overlay',
|
| - loadTimeData.getString('keyboardOverlayTabTitle'),
|
| - 'keyboard-overlay',
|
| + options.SettingsDialog.call(
|
| + this, 'keyboard-overlay',
|
| + loadTimeData.getString('keyboardOverlayTabTitle'), 'keyboard-overlay',
|
| assertInstanceof($('keyboard-confirm'), HTMLButtonElement),
|
| assertInstanceof($('keyboard-cancel'), HTMLButtonElement));
|
| }
|
| @@ -63,14 +61,16 @@ cr.define('options', function() {
|
|
|
| $('languages-and-input-settings').onclick = function(e) {
|
| PageManager.showPageByName('languages');
|
| - chrome.send('coreOptionsUserMetricsAction',
|
| - ['Options_KeyboardShowLanguageSettings']);
|
| + chrome.send(
|
| + 'coreOptionsUserMetricsAction',
|
| + ['Options_KeyboardShowLanguageSettings']);
|
| };
|
|
|
| $('keyboard-shortcuts').onclick = function(e) {
|
| chrome.send('showKeyboardShortcuts');
|
| - chrome.send('coreOptionsUserMetricsAction',
|
| - ['Options_KeyboardShowKeyboardShortcuts']);
|
| + chrome.send(
|
| + 'coreOptionsUserMetricsAction',
|
| + ['Options_KeyboardShowKeyboardShortcuts']);
|
| };
|
| },
|
|
|
| @@ -82,8 +82,8 @@ cr.define('options', function() {
|
| * @private
|
| */
|
| handleAutoRepeatEnabledPrefChange_: function(e) {
|
| - $('auto-repeat-settings-section').classList.toggle('disabled',
|
| - !e.value.value);
|
| + $('auto-repeat-settings-section')
|
| + .classList.toggle('disabled', !e.value.value);
|
| $('auto-repeat-delay-range').disabled =
|
| $('auto-repeat-interval-range').disabled = !e.value.value;
|
| return false;
|
| @@ -97,9 +97,8 @@ cr.define('options', function() {
|
| * @private
|
| */
|
| handleAutoRepeatDelayPrefChange_: function(e) {
|
| - this.updateSliderFromValue_('auto-repeat-delay-range',
|
| - e.value.value,
|
| - AUTO_REPEAT_DELAYS);
|
| + this.updateSliderFromValue_(
|
| + 'auto-repeat-delay-range', e.value.value, AUTO_REPEAT_DELAYS);
|
| return true;
|
| },
|
|
|
| @@ -111,9 +110,8 @@ cr.define('options', function() {
|
| * @private
|
| */
|
| handleAutoRepeatIntervalPrefChange_: function(e) {
|
| - this.updateSliderFromValue_('auto-repeat-interval-range',
|
| - e.value.value,
|
| - AUTO_REPEAT_INTERVALS);
|
| + this.updateSliderFromValue_(
|
| + 'auto-repeat-interval-range', e.value.value, AUTO_REPEAT_INTERVALS);
|
| return true;
|
| },
|
|
|
| @@ -146,15 +144,15 @@ cr.define('options', function() {
|
| if (index == -1) {
|
| var closestValue = Infinity;
|
| for (var i = 0; i < values.length; i++) {
|
| - if (Math.abs(values[i] - value) <
|
| - Math.abs(closestValue - value)) {
|
| + if (Math.abs(values[i] - value) < Math.abs(closestValue - value)) {
|
| closestValue = values[i];
|
| index = i;
|
| }
|
| }
|
|
|
| - assert(index != -1,
|
| - 'Failed to update ' + id + ' from pref with value ' + value);
|
| + assert(
|
| + index != -1,
|
| + 'Failed to update ' + id + ' from pref with value ' + value);
|
| }
|
|
|
| $(id).value = index;
|
| @@ -168,7 +166,5 @@ cr.define('options', function() {
|
| ]);
|
|
|
| // Export
|
| - return {
|
| - KeyboardOverlay: KeyboardOverlay
|
| - };
|
| + return {KeyboardOverlay: KeyboardOverlay};
|
| });
|
|
|