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

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

Issue 10826267: [cros] OOBE transitions polishing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/oobe.css » ('j') | 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) 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 Display manager for WebUI OOBE and login. 6 * @fileoverview Display manager for WebUI OOBE and login.
7 */ 7 */
8 8
9 // TODO(xiyuan): Find a better to share those constants. 9 // TODO(xiyuan): Find a better to share those constants.
10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect'; 10 /** @const */ var SCREEN_OOBE_NETWORK = 'connect';
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 oldStep.classList.contains('right')) { 228 oldStep.classList.contains('right')) {
229 oldStep.classList.remove('animation'); 229 oldStep.classList.remove('animation');
230 oldStep.classList.add('hidden'); 230 oldStep.classList.add('hidden');
231 } 231 }
232 }); 232 });
233 } else { 233 } else {
234 oldStep.classList.add('hidden'); 234 oldStep.classList.add('hidden');
235 } 235 }
236 } else { 236 } else {
237 // First screen on OOBE launch. 237 // First screen on OOBE launch.
238 $('inner-container').classList.remove('down'); 238 var innerContainer = $('inner-container');
239 newHeader.classList.remove('right'); 239 innerContainer.classList.remove('down');
240 innerContainer.addEventListener(
241 'webkitTransitionEnd', function f(e) {
242 innerContainer.removeEventListener('webkitTransitionEnd', f);
243 $('progress-dots').classList.remove('down');
244 });
245 newHeader.classList.remove('right'); // Old OOBE.
240 // Report back first OOBE screen being painted. 246 // Report back first OOBE screen being painted.
241 window.webkitRequestAnimationFrame(function() { 247 window.webkitRequestAnimationFrame(function() {
242 chrome.send('loginVisible'); 248 chrome.send('loginVisible');
243 }); 249 });
244 } 250 }
245 this.currentStep_ = nextStepIndex; 251 this.currentStep_ = nextStepIndex;
246 $('oobe').className = nextStepId; 252 $('oobe').className = nextStepId;
247 253
248 $('step-logo').hidden = newStep.classList.contains('no-logo'); 254 $('step-logo').hidden = newStep.classList.contains('no-logo');
249 }, 255 },
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 319
314 /** 320 /**
315 * Updates inner container size based on the size of the current screen and 321 * Updates inner container size based on the size of the current screen and
316 * other screens in the same group. 322 * other screens in the same group.
317 * Should be executed on screen change / screen size change. 323 * Should be executed on screen change / screen size change.
318 * @param {!HTMLElement} screen Screen that is being shown. 324 * @param {!HTMLElement} screen Screen that is being shown.
319 */ 325 */
320 updateInnerContainerSize_: function(screen) { 326 updateInnerContainerSize_: function(screen) {
321 var height = screen.offsetHeight; 327 var height = screen.offsetHeight;
322 var width = screen.offsetWidth; 328 var width = screen.offsetWidth;
323 for (var i = 0, screenGroup; screenGroup = SCREEN_GROUPS[i]; i++) { 329 if (this.isNewOobe()) {
324 if (screenGroup.indexOf(screen.id) != -1) { 330 for (var i = 0, screenGroup; screenGroup = SCREEN_GROUPS[i]; i++) {
325 // Set screen dimensions to maximum dimensions within this group. 331 if (screenGroup.indexOf(screen.id) != -1) {
326 for (var j = 0, screen2; screen2 = $(screenGroup[j]); j++) { 332 // Set screen dimensions to maximum dimensions within this group.
327 height = Math.max(height, screen2.offsetHeight); 333 for (var j = 0, screen2; screen2 = $(screenGroup[j]); j++) {
328 width = Math.max(width, screen2.offsetWidth); 334 height = Math.max(height, screen2.offsetHeight);
335 width = Math.max(width, screen2.offsetWidth);
336 }
337 break;
329 } 338 }
330 break;
331 } 339 }
332 } 340 }
333 $('inner-container').style.height = height + 'px'; 341 $('inner-container').style.height = height + 'px';
334 if (this.isNewOobe()) { 342 if (this.isNewOobe()) {
335 $('inner-container').style.width = width + 'px'; 343 $('inner-container').style.width = width + 'px';
336 // This requires |screen| to have |box-sizing: border-box|. 344 // This requires |screen| to have 'box-sizing: border-box'.
337 screen.style.width = width + 'px'; 345 screen.style.width = width + 'px';
338 screen.style.height = height + 'px'; 346 screen.style.height = height + 'px';
339 } 347 }
340 }, 348 },
341 349
342 /** 350 /**
343 * Updates localized content of the screens like headers, buttons and links. 351 * Updates localized content of the screens like headers, buttons and links.
344 * Should be executed on language change. 352 * Should be executed on language change.
345 */ 353 */
346 updateLocalizedContent_: function() { 354 updateLocalizedContent_: function() {
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 }); 552 });
545 } 553 }
546 } 554 }
547 }; 555 };
548 556
549 // Export 557 // Export
550 return { 558 return {
551 DisplayManager: DisplayManager 559 DisplayManager: DisplayManager
552 }; 560 };
553 }); 561 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/oobe.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698