Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_error_message.js

Issue 8992008: [cros,webui] Pass correct params when showing network drop-down. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 cr.define('login', function() { 9 cr.define('login', function() {
10 // Screens that should have offline message overlay. 10 // Screens that should have offline message overlay.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 chrome.send('loginRequestNetworkState', 230 chrome.send('loginRequestNetworkState',
231 ['login.ErrorMessageScreen.maybeRetry', 231 ['login.ErrorMessageScreen.maybeRetry',
232 'frame error:' + error]); 232 'frame error:' + error]);
233 } 233 }
234 } 234 }
235 }; 235 };
236 236
237 /** 237 /**
238 * Network state callback where we decide whether to schdule a retry. 238 * Network state callback where we decide whether to schdule a retry.
239 */ 239 */
240 ErrorMessageScreen.maybeRetry = function(state, network, reason) { 240 ErrorMessageScreen.maybeRetry =
241 function(state, network, reason, lastNetworkType) {
241 console.log('ErrorMessageScreen.maybeRetry, state=' + state + 242 console.log('ErrorMessageScreen.maybeRetry, state=' + state +
242 ', network=' + network); 243 ', network=' + network);
243 244
244 // No retry if we are not online. 245 // No retry if we are not online.
245 if (state != NET_STATE.ONLINE) 246 if (state != NET_STATE.ONLINE)
246 return; 247 return;
247 248
248 var currentScreen = Oobe.getInstance().currentScreen; 249 var currentScreen = Oobe.getInstance().currentScreen;
249 if (MANAGED_SCREENS.indexOf(currentScreen.id) != -1) { 250 if (MANAGED_SCREENS.indexOf(currentScreen.id) != -1) {
250 this.updateState(NET_STATE.PORTAL, network, reason); 251 this.updateState(NET_STATE.PORTAL, network, reason, lastNetworkType);
251 // Schedules a retry. 252 // Schedules a retry.
252 currentScreen.scheduleRetry(); 253 currentScreen.scheduleRetry();
253 } 254 }
254 }; 255 };
255 256
256 /** 257 /**
257 * Updates screen localized content like links since they're not updated 258 * Updates screen localized content like links since they're not updated
258 * via template. 259 * via template.
259 */ 260 */
260 ErrorMessageScreen.updateLocalizedContent = function() { 261 ErrorMessageScreen.updateLocalizedContent = function() {
261 $('error-message').updateLocalizedContent_(); 262 $('error-message').updateLocalizedContent_();
262 }; 263 };
263 264
264 return { 265 return {
265 ErrorMessageScreen: ErrorMessageScreen 266 ErrorMessageScreen: ErrorMessageScreen
266 }; 267 };
267 }); 268 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698