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

Side by Side Diff: chrome/browser/resources/settings/device_page/keyboard.js

Issue 2946563002: Run clang-format on .js files in c/b/r/settings (Closed)
Patch Set: dschuyler@ review Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-keyboard' is the settings subpage with keyboard settings. 7 * 'settings-keyboard' is the settings subpage with keyboard settings.
8 */ 8 */
9 cr.exportPath('settings'); 9 cr.exportPath('settings');
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 settings.DevicePageBrowserProxyImpl.getInstance().initializeKeyboard(); 73 settings.DevicePageBrowserProxyImpl.getInstance().initializeKeyboard();
74 this.setUpKeyMapTargets_(); 74 this.setUpKeyMapTargets_();
75 }, 75 },
76 76
77 /** 77 /**
78 * Initializes the dropdown menu options for remapping keys. 78 * Initializes the dropdown menu options for remapping keys.
79 * @private 79 * @private
80 */ 80 */
81 setUpKeyMapTargets_: function() { 81 setUpKeyMapTargets_: function() {
82 // Ordering is according to UX, but values match settings.ModifierKey. 82 // Ordering is according to UX, but values match settings.ModifierKey.
83 this.keyMapTargets_ = [{ 83 this.keyMapTargets_ = [
84 value: settings.ModifierKey.SEARCH_KEY, 84 {
85 name: loadTimeData.getString('keyboardKeySearch'), 85 value: settings.ModifierKey.SEARCH_KEY,
86 }, { 86 name: loadTimeData.getString('keyboardKeySearch'),
87 value: settings.ModifierKey.CONTROL_KEY, 87 },
88 name: loadTimeData.getString('keyboardKeyCtrl') 88 {
89 }, { 89 value: settings.ModifierKey.CONTROL_KEY,
90 value: settings.ModifierKey.ALT_KEY, 90 name: loadTimeData.getString('keyboardKeyCtrl')
91 name: loadTimeData.getString('keyboardKeyAlt') 91 },
92 }, { 92 {
93 value: settings.ModifierKey.CAPS_LOCK_KEY, 93 value: settings.ModifierKey.ALT_KEY,
94 name: loadTimeData.getString('keyboardKeyCapsLock') 94 name: loadTimeData.getString('keyboardKeyAlt')
95 }, { 95 },
96 value: settings.ModifierKey.ESCAPE_KEY, 96 {
97 name: loadTimeData.getString('keyboardKeyEscape') 97 value: settings.ModifierKey.CAPS_LOCK_KEY,
98 }, { 98 name: loadTimeData.getString('keyboardKeyCapsLock')
99 value: settings.ModifierKey.BACKSPACE_KEY, 99 },
100 name: loadTimeData.getString('keyboardKeyBackspace') 100 {
101 }, { 101 value: settings.ModifierKey.ESCAPE_KEY,
102 value: settings.ModifierKey.VOID_KEY, 102 name: loadTimeData.getString('keyboardKeyEscape')
103 name: loadTimeData.getString('keyboardKeyDisabled') 103 },
104 }]; 104 {
105 value: settings.ModifierKey.BACKSPACE_KEY,
106 name: loadTimeData.getString('keyboardKeyBackspace')
107 },
108 {
109 value: settings.ModifierKey.VOID_KEY,
110 name: loadTimeData.getString('keyboardKeyDisabled')
111 }
112 ];
105 }, 113 },
106 114
107 /** 115 /**
108 * Handler for updating which keys to show. 116 * Handler for updating which keys to show.
109 * @param {boolean} showCapsLock 117 * @param {boolean} showCapsLock
110 * @param {boolean} showDiamondKey 118 * @param {boolean} showDiamondKey
111 * @private 119 * @private
112 */ 120 */
113 onShowKeysChange_: function(showCapsLock, showDiamondKey) { 121 onShowKeysChange_: function(showCapsLock, showDiamondKey) {
114 this.showCapsLock_ = showCapsLock; 122 this.showCapsLock_ = showCapsLock;
115 this.showDiamondKey_ = showDiamondKey; 123 this.showDiamondKey_ = showDiamondKey;
116 }, 124 },
117 125
118 onShowKeyboardShortcutsOverlayTap_: function() { 126 onShowKeyboardShortcutsOverlayTap_: function() {
119 settings.DevicePageBrowserProxyImpl.getInstance() 127 settings.DevicePageBrowserProxyImpl.getInstance()
120 .showKeyboardShortcutsOverlay(); 128 .showKeyboardShortcutsOverlay();
121 }, 129 },
122 130
123 onShowLanguageInputTap_: function() { 131 onShowLanguageInputTap_: function() {
124 settings.navigateTo(settings.Route.LANGUAGES); 132 settings.navigateTo(settings.Route.LANGUAGES);
125 }, 133 },
126 }); 134 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698