| 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 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 }, | 465 }, |
| 466 | 466 |
| 467 /** | 467 /** |
| 468 * Returns true if Oobe UI is shown. | 468 * Returns true if Oobe UI is shown. |
| 469 */ | 469 */ |
| 470 isOobeUI: function() { | 470 isOobeUI: function() { |
| 471 return !document.body.classList.contains('login-display'); | 471 return !document.body.classList.contains('login-display'); |
| 472 }, | 472 }, |
| 473 | 473 |
| 474 /** | 474 /** |
| 475 * Returns true if the current screen is the lock screen. | 475 * Returns true if the current UI type is the "Sign-in to add user" |
| 476 * (another user session is already active). |
| 477 */ |
| 478 isSignInToAddScreen: function() { |
| 479 return document.documentElement.getAttribute('screen') == |
| 480 'login-add-user'; |
| 481 }, |
| 482 |
| 483 /** |
| 484 * Returns true if the current UI type is the lock screen. |
| 476 */ | 485 */ |
| 477 isLockScreen: function() { | 486 isLockScreen: function() { |
| 478 return document.documentElement.getAttribute('screen') == 'lock'; | 487 return document.documentElement.getAttribute('screen') == 'lock'; |
| 479 }, | 488 }, |
| 480 | 489 |
| 481 /** | 490 /** |
| 482 * Returns true if sign in UI should trigger wallpaper load on boot. | 491 * Returns true if sign in UI should trigger wallpaper load on boot. |
| 483 */ | 492 */ |
| 484 shouldLoadWallpaperOnBoot: function() { | 493 shouldLoadWallpaperOnBoot: function() { |
| 485 return loadTimeData.getString('bootIntoWallpaper') == 'on'; | 494 return loadTimeData.getString('bootIntoWallpaper') == 'on'; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 */ | 676 */ |
| 668 DisplayManager.clearUserPodPassword = function() { | 677 DisplayManager.clearUserPodPassword = function() { |
| 669 $('pod-row').clearFocusedPod(); | 678 $('pod-row').clearFocusedPod(); |
| 670 }; | 679 }; |
| 671 | 680 |
| 672 // Export | 681 // Export |
| 673 return { | 682 return { |
| 674 DisplayManager: DisplayManager | 683 DisplayManager: DisplayManager |
| 675 }; | 684 }; |
| 676 }); | 685 }); |
| OLD | NEW |