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 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 currentScreen.addEventListener('webkitTransitionEnd', | 334 currentScreen.addEventListener('webkitTransitionEnd', |
335 function f(e) { | 335 function f(e) { |
336 currentScreen.removeEventListener('webkitTransitionEnd', f); | 336 currentScreen.removeEventListener('webkitTransitionEnd', f); |
337 if (currentScreen.classList.contains('faded')) | 337 if (currentScreen.classList.contains('faded')) |
338 currentScreen.classList.add('hidden'); | 338 currentScreen.classList.add('hidden'); |
339 }); | 339 }); |
340 } | 340 } |
341 chrome.send('networkErrorShown'); | 341 chrome.send('networkErrorShown'); |
342 // Report back error screen UI being painted. | 342 // Report back error screen UI being painted. |
343 window.webkitRequestAnimationFrame(function() { | 343 window.webkitRequestAnimationFrame(function() { |
344 chrome.send('loginVisible'); | 344 chrome.send('loginVisible', ['network-error']); |
345 }); | 345 }); |
346 } else { | 346 } else { |
347 chrome.send('hideCaptivePortal'); | 347 chrome.send('hideCaptivePortal'); |
348 | 348 |
349 if (!offlineMessage.classList.contains('faded')) { | 349 if (!offlineMessage.classList.contains('faded')) { |
350 console.log('Hide offline message. state=' + state + | 350 console.log('Hide offline message. state=' + state + |
351 ', network=' + network + ', reason=' + reason); | 351 ', network=' + network + ', reason=' + reason); |
352 | 352 |
353 offlineMessage.onBeforeHide(); | 353 offlineMessage.onBeforeHide(); |
354 | 354 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 * via template. | 455 * via template. |
456 */ | 456 */ |
457 ErrorMessageScreen.updateLocalizedContent = function() { | 457 ErrorMessageScreen.updateLocalizedContent = function() { |
458 $('error-message').updateLocalizedContent_(); | 458 $('error-message').updateLocalizedContent_(); |
459 }; | 459 }; |
460 | 460 |
461 return { | 461 return { |
462 ErrorMessageScreen: ErrorMessageScreen | 462 ErrorMessageScreen: ErrorMessageScreen |
463 }; | 463 }; |
464 }); | 464 }); |
OLD | NEW |