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

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

Issue 2651483002: MD Settings: Eliminate use of ES6 for Chrome OS (Closed)
Patch Set: Feedback Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 cr.exportPath('settings'); 5 cr.exportPath('settings');
6 6
7 (function() { 7 (function() {
8 8
9 var PairingEventType = chrome.bluetoothPrivate.PairingEventType; 9 var PairingEventType = chrome.bluetoothPrivate.PairingEventType;
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 this.close(); 53 this.close();
54 }, 54 },
55 55
56 /** @private */ 56 /** @private */
57 deviceListChanged_: function() { 57 deviceListChanged_: function() {
58 this.updateScrollableContents(); 58 this.updateScrollableContents();
59 if (this.itemWasFocused_ || !this.getUnpaired_().length) 59 if (this.itemWasFocused_ || !this.getUnpaired_().length)
60 return; 60 return;
61 // If the iron-list is populated with at least one visible item then 61 // If the iron-list is populated with at least one visible item then
62 // focus it. 62 // focus it.
63 let item = this.$$('iron-list bluetooth-device-list-item'); 63 var item = this.$$('iron-list bluetooth-device-list-item');
64 if (item && item.offsetParent != null) { 64 if (item && item.offsetParent != null) {
65 item.focus(); 65 item.focus();
66 this.itemWasFocused_ = true; 66 this.itemWasFocused_ = true;
67 return; 67 return;
68 } 68 }
69 // Otherwise try again. 69 // Otherwise try again.
70 setTimeout(function() { this.deviceListChanged_(); }.bind(this), 100); 70 setTimeout(function() { this.deviceListChanged_(); }.bind(this), 100);
71 }, 71 },
72 72
73 /** @private */ 73 /** @private */
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 }, 406 },
407 407
408 /** @private */ 408 /** @private */
409 onDialogCanceled_: function() { 409 onDialogCanceled_: function() {
410 if (this.dialogId == 'pairDevice') 410 if (this.dialogId == 'pairDevice')
411 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL); 411 this.sendResponse_(chrome.bluetoothPrivate.PairingResponse.CANCEL);
412 }, 412 },
413 }); 413 });
414 414
415 })(); 415 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698