| 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-page' is the settings page for managing bluetooth | 7 * 'settings-bluetooth-page' is the settings page for managing bluetooth |
| 8 * properties and devices. | 8 * properties and devices. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 } | 367 } |
| 368 if (e.pairing == chrome.bluetoothPrivate.PairingEventType.KEYS_ENTERED && | 368 if (e.pairing == chrome.bluetoothPrivate.PairingEventType.KEYS_ENTERED && |
| 369 e.passkey === undefined && this.pairingEvent_) { | 369 e.passkey === undefined && this.pairingEvent_) { |
| 370 // 'keysEntered' event might not include the updated passkey so preserve | 370 // 'keysEntered' event might not include the updated passkey so preserve |
| 371 // the current one. | 371 // the current one. |
| 372 e.passkey = this.pairingEvent_.passkey; | 372 e.passkey = this.pairingEvent_.passkey; |
| 373 } | 373 } |
| 374 this.pairingEvent_ = e; | 374 this.pairingEvent_ = e; |
| 375 }, | 375 }, |
| 376 | 376 |
| 377 /** @private */ | 377 /** |
| 378 onAddDeviceTap_: function() { | 378 * @param {!Event} e |
| 379 * @private |
| 380 */ |
| 381 onAddDeviceTap_: function(e) { |
| 382 e.preventDefault(); |
| 379 this.openDialog_('addDevice'); | 383 this.openDialog_('addDevice'); |
| 380 }, | 384 }, |
| 381 | 385 |
| 382 /** | 386 /** |
| 383 * @param {!{detail: {action: string, device: !chrome.bluetooth.Device}}} e | 387 * @param {!{detail: {action: string, device: !chrome.bluetooth.Device}}} e |
| 384 * @private | 388 * @private |
| 385 */ | 389 */ |
| 386 onDeviceEvent_: function(e) { | 390 onDeviceEvent_: function(e) { |
| 387 var action = e.detail.action; | 391 var action = e.detail.action; |
| 388 var device = e.detail.device; | 392 var device = e.detail.device; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 }, | 570 }, |
| 567 | 571 |
| 568 /** @private */ | 572 /** @private */ |
| 569 onDialogClosed_: function() { | 573 onDialogClosed_: function() { |
| 570 this.stopDiscovery_(); | 574 this.stopDiscovery_(); |
| 571 this.dialogId_ = ''; | 575 this.dialogId_ = ''; |
| 572 this.pairingDevice_ = null; | 576 this.pairingDevice_ = null; |
| 573 this.pairingEvent_ = null; | 577 this.pairingEvent_ = null; |
| 574 }, | 578 }, |
| 575 }); | 579 }); |
| OLD | NEW |