OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Oobe HID detection screen implementation. | 6 * @fileoverview Oobe HID detection screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('HIDDetectionScreen', 'hid-detection', function() { | 9 login.createScreen('HIDDetectionScreen', 'hid-detection', function() { |
10 return { | 10 return { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 $('hid-keyboard-label-paired').textContent = data['keyboard-label']; | 125 $('hid-keyboard-label-paired').textContent = data['keyboard-label']; |
126 else if (state == 'pairing') { | 126 else if (state == 'pairing') { |
127 $('hid-keyboard-label-pairing').textContent = data['keyboard-label']; | 127 $('hid-keyboard-label-pairing').textContent = data['keyboard-label']; |
128 if (data['pairing-state'] == this.PAIRING.REMOTE_PIN_CODE || | 128 if (data['pairing-state'] == this.PAIRING.REMOTE_PIN_CODE || |
129 data['pairing-state'] == this.PAIRING.REMOTE_PASSKEY) { | 129 data['pairing-state'] == this.PAIRING.REMOTE_PASSKEY) { |
130 this.setPincodeKeysState_(-1); | 130 this.setPincodeKeysState_(-1); |
131 for (var i = 0, len = data['pincode'].length; i < len; i++) { | 131 for (var i = 0, len = data['pincode'].length; i < len; i++) { |
132 var pincodeSymbol = $('hid-keyboard-pincode-sym-' + (i + 1)); | 132 var pincodeSymbol = $('hid-keyboard-pincode-sym-' + (i + 1)); |
133 pincodeSymbol.textContent = data['pincode'][i]; | 133 pincodeSymbol.textContent = data['pincode'][i]; |
134 } | 134 } |
| 135 announceAccessibleMessage( |
| 136 data['keyboard-label'] + ' ' + data['pincode'] + ' ' + |
| 137 loadTimeData.getString('hidDetectionBTEnterKey')); |
135 } | 138 } |
136 } else if (state == 'update') { | 139 } else if (state == 'update') { |
137 if ('keysEntered' in data) { | 140 if ('keysEntered' in data) { |
138 this.setPincodeKeysState_(data['keysEntered']); | 141 this.setPincodeKeysState_(data['keysEntered']); |
139 } | 142 } |
140 } | 143 } |
141 }, | 144 }, |
142 | 145 |
143 /** | 146 /** |
144 * Event handler that is invoked just before the screen in shown. | 147 * Event handler that is invoked just before the screen in shown. |
(...skipping 15 matching lines...) Expand all Loading... |
160 /** | 163 /** |
161 * Displays the pairing overlay. | 164 * Displays the pairing overlay. |
162 * @param {Object} device Description of the Bluetooth device. | 165 * @param {Object} device Description of the Bluetooth device. |
163 */ | 166 */ |
164 showPairingLayout: function(device) { | 167 showPairingLayout: function(device) { |
165 BluetoothPairing.getInstance().update(device); | 168 BluetoothPairing.getInstance().update(device); |
166 OptionsPage.showPageByName('bluetoothPairing', false); | 169 OptionsPage.showPageByName('bluetoothPairing', false); |
167 }, | 170 }, |
168 }; | 171 }; |
169 }); | 172 }); |
OLD | NEW |