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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(function(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 this.$$('paper-radio-group').select(this.targetChannel_); | 55 var radioGroup = this.$$('paper-radio-group'); |
| 56 radioGroup.select(this.targetChannel_); |
| 57 radioGroup.focus(); |
56 }.bind(this)); | 58 }.bind(this)); |
57 }, | 59 }, |
58 | 60 |
59 /** @override */ | 61 /** @override */ |
60 attached: function() { | 62 attached: function() { |
61 this.$.dialog.showModal(); | 63 this.$.dialog.showModal(); |
62 }, | 64 }, |
63 | 65 |
64 /** @private */ | 66 /** @private */ |
65 onCancelTap_: function() { | 67 onCancelTap_: function() { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 }, | 166 }, |
165 | 167 |
166 /** | 168 /** |
167 * @return {boolean} | 169 * @return {boolean} |
168 * @private | 170 * @private |
169 */ | 171 */ |
170 shouldShowWarning_: function() { | 172 shouldShowWarning_: function() { |
171 return this.warning_ !== null; | 173 return this.warning_ !== null; |
172 }, | 174 }, |
173 }); | 175 }); |
OLD | NEW |