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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 if (this.dialogId) { | 524 if (this.dialogId) { |
525 // Dialog already opened, just update the contents. | 525 // Dialog already opened, just update the contents. |
526 this.dialogId = dialogId; | 526 this.dialogId = dialogId; |
527 return; | 527 return; |
528 } | 528 } |
529 this.dialogId = dialogId; | 529 this.dialogId = dialogId; |
530 // Call flush so that the dialog gets sized correctly before it is opened. | 530 // Call flush so that the dialog gets sized correctly before it is opened. |
531 Polymer.dom.flush(); | 531 Polymer.dom.flush(); |
532 var dialog = this.$$('#deviceDialog'); | 532 var dialog = this.$$('#deviceDialog'); |
533 dialog.open(); | 533 dialog.open(); |
534 dialog.focus(); | 534 this.startDiscovery_(); |
535 }, | 535 }, |
536 | 536 |
537 /** @private */ | 537 /** @private */ |
538 onDialogClosed_: function() { | 538 onDialogClosed_: function() { |
539 this.stopDiscovery_(); | 539 this.stopDiscovery_(); |
540 this.dialogId = ''; | 540 this.dialogId = ''; |
541 this.pairingDevice = null; | 541 this.pairingDevice = null; |
542 this.pairingEvent = null; | 542 this.pairingEvent = null; |
543 }, | 543 }, |
544 | |
545 /** @private */ | |
546 onDialogOpened_: function() { this.startDiscovery_(); }, | |
547 }); | 544 }); |
OLD | NEW |