Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 /** | 5 /** |
| 6 * @fileoverview 'settings-detailed-build-info' contains detailed build | 6 * @fileoverview 'settings-detailed-build-info' contains detailed build |
| 7 * information for ChromeOS. | 7 * information for ChromeOS. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 CrPolicyIndicatorType.OWNER; | 82 CrPolicyIndicatorType.OWNER; |
| 83 }, | 83 }, |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * @param {!Event} e | 86 * @param {!Event} e |
| 87 * @private | 87 * @private |
| 88 */ | 88 */ |
| 89 onChangeChannelTap_: function(e) { | 89 onChangeChannelTap_: function(e) { |
| 90 e.preventDefault(); | 90 e.preventDefault(); |
| 91 this.showChannelSwitcherDialog_ = true; | 91 this.showChannelSwitcherDialog_ = true; |
| 92 // Async to wait for dialog to appear in the DOM. | 92 }, |
| 93 this.async(function() { | 93 |
| 94 var dialog = this.$$('settings-channel-switcher-dialog'); | 94 /** @private */ |
| 95 // Register listener to detect when the dialog is closed. Flip the boolean | 95 onChannelSwitcherDialogClosed_: function() { |
| 96 // once closed to force a restamp next time it is shown such that the | 96 this.showChannelSwitcherDialog_ = false; |
| 97 // previous dialog's contents are cleared. | 97 this.$$('paper-button').focus(); |
| 98 dialog.addEventListener('close', function() { | 98 this.updateChannelInfo_(); |
|
stevenjb
2017/04/06 23:08:06
Ahh, much nicer :) Cheers!
| |
| 99 this.showChannelSwitcherDialog_ = false; | |
| 100 this.updateChannelInfo_(); | |
| 101 }.bind(this)); | |
| 102 }.bind(this)); | |
| 103 }, | 99 }, |
| 104 }); | 100 }); |
| OLD | NEW |