OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 Offline message screen implementation. | 6 * @fileoverview Offline message screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('ErrorMessageScreen', 'error-message', function() { | 9 login.createScreen('ErrorMessageScreen', 'error-message', function() { |
10 // Link which starts guest session for captive portal fixing. | 10 // Link which starts guest session for captive portal fixing. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 }; | 129 }; |
130 this.onContentChange_(); | 130 this.onContentChange_(); |
131 }, | 131 }, |
132 | 132 |
133 /** | 133 /** |
134 * Event handler that is invoked just before the screen in shown. | 134 * Event handler that is invoked just before the screen in shown. |
135 * @param {Object} data Screen init payload. | 135 * @param {Object} data Screen init payload. |
136 */ | 136 */ |
137 onBeforeShow: function(data) { | 137 onBeforeShow: function(data) { |
138 cr.ui.Oobe.clearErrors(); | 138 cr.ui.Oobe.clearErrors(); |
139 var lastNetworkType = 0; | 139 cr.ui.DropDown.show('offline-networks-list', false); |
140 if (data && data['lastNetworkType']) | |
141 lastNetworkType = data['lastNetworkType']; | |
142 cr.ui.DropDown.show('offline-networks-list', false, lastNetworkType); | |
143 }, | 140 }, |
144 | 141 |
145 /** | 142 /** |
146 * Event handler that is invoked just before the screen is hidden. | 143 * Event handler that is invoked just before the screen is hidden. |
147 */ | 144 */ |
148 onBeforeHide: function() { | 145 onBeforeHide: function() { |
149 cr.ui.DropDown.hide('offline-networks-list'); | 146 cr.ui.DropDown.hide('offline-networks-list'); |
150 }, | 147 }, |
151 | 148 |
152 /** | 149 /** |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 * @param {number} error_state New error state of the screen. | 212 * @param {number} error_state New error state of the screen. |
216 * @param {string} network Name of the current network | 213 * @param {string} network Name of the current network |
217 * @private | 214 * @private |
218 */ | 215 */ |
219 setErrorState: function(error_state, network) { | 216 setErrorState: function(error_state, network) { |
220 this.setErrorState_(ERROR_STATES[error_state], network); | 217 this.setErrorState_(ERROR_STATES[error_state], network); |
221 } | 218 } |
222 }; | 219 }; |
223 }); | 220 }); |
224 | 221 |
OLD | NEW |