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 Polymer element for displaying material design OOBE. | 6 * @fileoverview Polymer element for displaying material design OOBE. |
7 */ | 7 */ |
8 | 8 |
9 Polymer({ | 9 Polymer({ |
10 is: 'oobe-welcome-md', | 10 is: 'oobe-welcome-md', |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 type: Boolean, | 65 type: Boolean, |
66 value: false, | 66 value: false, |
67 }, | 67 }, |
68 | 68 |
69 /** | 69 /** |
70 * Flag that shows Network Selection screen. | 70 * Flag that shows Network Selection screen. |
71 */ | 71 */ |
72 networkSelectionScreenShown: { | 72 networkSelectionScreenShown: { |
73 type: Boolean, | 73 type: Boolean, |
74 value: false, | 74 value: false, |
| 75 observer: 'networkSelectionScreenShownChanged_', |
75 }, | 76 }, |
76 | 77 |
77 /** | 78 /** |
78 * Flag that enables MD-OOBE. | 79 * Flag that enables MD-OOBE. |
79 */ | 80 */ |
80 enabled: { | 81 enabled: { |
81 type: Boolean, | 82 type: Boolean, |
82 value: false, | 83 value: false, |
83 }, | 84 }, |
84 | 85 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 */ | 127 */ |
127 networkLastSelectedGuid_: '', | 128 networkLastSelectedGuid_: '', |
128 | 129 |
129 /** | 130 /** |
130 * Sets proper focus. | 131 * Sets proper focus. |
131 */ | 132 */ |
132 focus: function() { | 133 focus: function() { |
133 this.$.welcomeNextButton.focus(); | 134 this.$.welcomeNextButton.focus(); |
134 }, | 135 }, |
135 | 136 |
| 137 /** @private */ |
| 138 networkSelectionScreenShownChanged_: function() { |
| 139 if (this.networkSelectionScreenShown) { |
| 140 // After #networkSelect is stamped, trigger a refresh so that the list |
| 141 // will be updated with the currently visible networks and sized |
| 142 // appropriately. |
| 143 this.async(function() { |
| 144 this.$.networkSelect.refreshNetworks(); |
| 145 }.bind(this)); |
| 146 } |
| 147 }, |
| 148 |
136 /** | 149 /** |
137 * Handles "visible" event. | 150 * Handles "visible" event. |
138 * @private | 151 * @private |
139 */ | 152 */ |
140 onAnimationFinish_: function() { | 153 onAnimationFinish_: function() { |
141 this.focus(); | 154 this.focus(); |
142 }, | 155 }, |
143 | 156 |
144 /** | 157 /** |
145 * Returns custom items for network selector. | 158 * Returns custom items for network selector. |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 * @private | 422 * @private |
410 */ | 423 */ |
411 onTimezoneSelected_: function(event) { | 424 onTimezoneSelected_: function(event) { |
412 var item = event.detail; | 425 var item = event.detail; |
413 if (!item) | 426 if (!item) |
414 return; | 427 return; |
415 | 428 |
416 this.screen.onTimezoneSelected_(item.value); | 429 this.screen.onTimezoneSelected_(item.value); |
417 }, | 430 }, |
418 }); | 431 }); |
OLD | NEW |