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

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

Issue 10476002: [cros] Change how we track momemt to emit login-prompt-visible signal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge + nit Created 8 years, 6 months 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
OLDNEW
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (!currentScreen.classList.contains('faded')) { 236 if (!currentScreen.classList.contains('faded')) {
237 currentScreen.classList.add('faded'); 237 currentScreen.classList.add('faded');
238 currentScreen.addEventListener('webkitTransitionEnd', 238 currentScreen.addEventListener('webkitTransitionEnd',
239 function f(e) { 239 function f(e) {
240 currentScreen.removeEventListener('webkitTransitionEnd', f); 240 currentScreen.removeEventListener('webkitTransitionEnd', f);
241 if (currentScreen.classList.contains('faded')) 241 if (currentScreen.classList.contains('faded'))
242 currentScreen.classList.add('hidden'); 242 currentScreen.classList.add('hidden');
243 }); 243 });
244 } 244 }
245 chrome.send('networkErrorShown'); 245 chrome.send('networkErrorShown');
246 // Report back error screen UI being painted.
247 window.webkitRequestAnimationFrame(function() {
248 chrome.send('loginVisible');
249 });
246 } else { 250 } else {
247 chrome.send('hideCaptivePortal'); 251 chrome.send('hideCaptivePortal');
248 252
249 if (!offlineMessage.classList.contains('faded')) { 253 if (!offlineMessage.classList.contains('faded')) {
250 console.log('Hide offline message. state=' + state + 254 console.log('Hide offline message. state=' + state +
251 ', network=' + network + ', reason=' + reason); 255 ', network=' + network + ', reason=' + reason);
252 256
253 offlineMessage.onBeforeHide(); 257 offlineMessage.onBeforeHide();
254 258
255 offlineMessage.classList.add('faded'); 259 offlineMessage.classList.add('faded');
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 * via template. 343 * via template.
340 */ 344 */
341 ErrorMessageScreen.updateLocalizedContent = function() { 345 ErrorMessageScreen.updateLocalizedContent = function() {
342 $('error-message').updateLocalizedContent_(); 346 $('error-message').updateLocalizedContent_();
343 }; 347 };
344 348
345 return { 349 return {
346 ErrorMessageScreen: ErrorMessageScreen 350 ErrorMessageScreen: ErrorMessageScreen
347 }; 351 };
348 }); 352 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698