| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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-bluetooth-pair-device-dialog' is the settings dialog for pairing | 7 * 'settings-bluetooth-pair-device-dialog' is the settings dialog for pairing |
| 8 * a bluetooth device. | 8 * a bluetooth device. |
| 9 * | 9 * |
| 10 * @group Chrome Settings Elements | 10 * @group Chrome Settings Elements |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 }, | 165 }, |
| 166 | 166 |
| 167 /** @private */ | 167 /** @private */ |
| 168 onRejectTap_: function() { | 168 onRejectTap_: function() { |
| 169 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.REJECT); | 169 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.REJECT); |
| 170 }, | 170 }, |
| 171 | 171 |
| 172 /** @private */ | 172 /** @private */ |
| 173 onCancelTap_: function() { | 173 onCancelTap_: function() { |
| 174 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); | 174 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); |
| 175 // Close the dialog immediately. |
| 176 this.fire('close-dialog', ''); |
| 175 }, | 177 }, |
| 176 | 178 |
| 177 /** @private */ | 179 /** @private */ |
| 178 onDismissTap_: function() { this.fire('close-dialog', ''); }, | 180 onDismissTap_: function() { this.fire('close-dialog', ''); }, |
| 179 | 181 |
| 180 /** @private */ | 182 /** @private */ |
| 181 sendResponse_: function(response) { | 183 sendResponse_: function(response) { |
| 182 if (!this.pairingDevice) | 184 if (!this.pairingDevice) |
| 183 return; | 185 return; |
| 184 var options = | 186 var options = |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 var lastKey = this.digits.length; // 6 | 262 var lastKey = this.digits.length; // 6 |
| 261 if ((index == -1 && enteredKey > lastKey) || (index + 1 == enteredKey)) | 263 if ((index == -1 && enteredKey > lastKey) || (index + 1 == enteredKey)) |
| 262 cssClass += ' next'; | 264 cssClass += ' next'; |
| 263 else if (index > enteredKey) | 265 else if (index > enteredKey) |
| 264 cssClass += ' untyped'; | 266 cssClass += ' untyped'; |
| 265 } | 267 } |
| 266 return cssClass; | 268 return cssClass; |
| 267 }, | 269 }, |
| 268 }); | 270 }); |
| 269 })(); | 271 })(); |
| OLD | NEW |