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-channel-switcher-dialog' is a component allowing the | 6 * @fileoverview 'settings-channel-switcher-dialog' is a component allowing the |
7 * user to switch between release channels (dev, beta, stable). A | 7 * user to switch between release channels (dev, beta, stable). A |
8 * |target-channel-changed| event is fired if the user does select a different | 8 * |target-channel-changed| event is fired if the user does select a different |
9 * release channel to notify parents of this dialog. | 9 * release channel to notify parents of this dialog. |
10 */ | 10 */ |
(...skipping 30 matching lines...) Expand all Loading... |
41 value: null, | 41 value: null, |
42 }, | 42 }, |
43 }, | 43 }, |
44 | 44 |
45 /** @private {?settings.AboutPageBrowserProxy} */ | 45 /** @private {?settings.AboutPageBrowserProxy} */ |
46 browserProxy_: null, | 46 browserProxy_: null, |
47 | 47 |
48 /** @override */ | 48 /** @override */ |
49 ready: function() { | 49 ready: function() { |
50 this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); | 50 this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); |
51 this.browserProxy_.getChannelInfo().then(function(info) { | 51 this.browserProxy_.getChannelInfo().then(info => { |
52 this.currentChannel_ = info.currentChannel; | 52 this.currentChannel_ = info.currentChannel; |
53 this.targetChannel_ = info.targetChannel; | 53 this.targetChannel_ = info.targetChannel; |
54 // Pre-populate radio group with target channel. | 54 // Pre-populate radio group with target channel. |
55 var radioGroup = this.$$('paper-radio-group'); | 55 var radioGroup = this.$$('paper-radio-group'); |
56 radioGroup.select(this.targetChannel_); | 56 radioGroup.select(this.targetChannel_); |
57 radioGroup.focus(); | 57 radioGroup.focus(); |
58 }.bind(this)); | 58 }); |
59 }, | 59 }, |
60 | 60 |
61 /** @override */ | 61 /** @override */ |
62 attached: function() { | 62 attached: function() { |
63 this.$.dialog.showModal(); | 63 this.$.dialog.showModal(); |
64 }, | 64 }, |
65 | 65 |
66 /** @private */ | 66 /** @private */ |
67 onCancelTap_: function() { | 67 onCancelTap_: function() { |
68 this.$.dialog.close(); | 68 this.$.dialog.close(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 }, | 166 }, |
167 | 167 |
168 /** | 168 /** |
169 * @return {boolean} | 169 * @return {boolean} |
170 * @private | 170 * @private |
171 */ | 171 */ |
172 shouldShowWarning_: function() { | 172 shouldShowWarning_: function() { |
173 return this.warning_ !== null; | 173 return this.warning_ !== null; |
174 }, | 174 }, |
175 }); | 175 }); |
OLD | NEW |