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

Side by Side Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js

Issue 2180823004: Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698