| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 /** @const */ var DISPLAY_TYPE = { | 79 /** @const */ var DISPLAY_TYPE = { |
| 80 UNKNOWN: 'unknown', | 80 UNKNOWN: 'unknown', |
| 81 OOBE: 'oobe', | 81 OOBE: 'oobe', |
| 82 LOGIN: 'login', | 82 LOGIN: 'login', |
| 83 LOCK: 'lock', | 83 LOCK: 'lock', |
| 84 USER_ADDING: 'user-adding', | 84 USER_ADDING: 'user-adding', |
| 85 APP_LAUNCH_SPLASH: 'app-launch-splash', | 85 APP_LAUNCH_SPLASH: 'app-launch-splash', |
| 86 DESKTOP_USER_MANAGER: 'login-add-user' | 86 DESKTOP_USER_MANAGER: 'login-add-user' |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 /** @const */ var USER_ACTION_ROLLBACK_TOGGLED = 'rollback-toggled'; | |
| 90 | |
| 91 cr.define('cr.ui.login', function() { | 89 cr.define('cr.ui.login', function() { |
| 92 var Bubble = cr.ui.Bubble; | 90 var Bubble = cr.ui.Bubble; |
| 93 | 91 |
| 94 /** | 92 /** |
| 95 * Maximum time in milliseconds to wait for step transition to finish. | 93 * Maximum time in milliseconds to wait for step transition to finish. |
| 96 * The value is used as the duration for ensureTransitionEndEvent below. | 94 * The value is used as the duration for ensureTransitionEndEvent below. |
| 97 * It needs to be inline with the step screen transition duration time | 95 * It needs to be inline with the step screen transition duration time |
| 98 * defined in css file. The current value in css is 200ms. To avoid emulated | 96 * defined in css file. The current value in css is 200ms. To avoid emulated |
| 99 * webkitTransitionEnd fired before real one, 250ms is used. | 97 * webkitTransitionEnd fired before real one, 250ms is used. |
| 100 * @const | 98 * @const |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 } else if (name == ACCELERATOR_KIOSK_ENABLE) { | 371 } else if (name == ACCELERATOR_KIOSK_ENABLE) { |
| 374 if (currentStepId == SCREEN_GAIA_SIGNIN || | 372 if (currentStepId == SCREEN_GAIA_SIGNIN || |
| 375 currentStepId == SCREEN_ACCOUNT_PICKER) { | 373 currentStepId == SCREEN_ACCOUNT_PICKER) { |
| 376 chrome.send('toggleKioskEnableScreen'); | 374 chrome.send('toggleKioskEnableScreen'); |
| 377 } | 375 } |
| 378 } else if (name == ACCELERATOR_VERSION) { | 376 } else if (name == ACCELERATOR_VERSION) { |
| 379 if (this.allowToggleVersion_) | 377 if (this.allowToggleVersion_) |
| 380 $('version-labels').hidden = !$('version-labels').hidden; | 378 $('version-labels').hidden = !$('version-labels').hidden; |
| 381 } else if (name == ACCELERATOR_RESET) { | 379 } else if (name == ACCELERATOR_RESET) { |
| 382 if (currentStepId == SCREEN_OOBE_RESET) | 380 if (currentStepId == SCREEN_OOBE_RESET) |
| 383 $('reset').send(login.Screen.CALLBACK_USER_ACTED, | 381 chrome.send('toggleRollbackOnResetScreen'); |
| 384 USER_ACTION_ROLLBACK_TOGGLED); | |
| 385 else if (RESET_AVAILABLE_SCREEN_GROUP.indexOf(currentStepId) != -1) | 382 else if (RESET_AVAILABLE_SCREEN_GROUP.indexOf(currentStepId) != -1) |
| 386 chrome.send('toggleResetScreen'); | 383 chrome.send('toggleResetScreen'); |
| 387 } else if (name == ACCELERATOR_DEVICE_REQUISITION) { | 384 } else if (name == ACCELERATOR_DEVICE_REQUISITION) { |
| 388 if (this.isOobeUI()) | 385 if (this.isOobeUI()) |
| 389 this.showDeviceRequisitionPrompt_(); | 386 this.showDeviceRequisitionPrompt_(); |
| 390 } else if (name == ACCELERATOR_DEVICE_REQUISITION_REMORA) { | 387 } else if (name == ACCELERATOR_DEVICE_REQUISITION_REMORA) { |
| 391 if (this.isOobeUI()) | 388 if (this.isOobeUI()) |
| 392 this.showDeviceRequisitionRemoraPrompt_( | 389 this.showDeviceRequisitionRemoraPrompt_( |
| 393 'deviceRequisitionRemoraPromptText', 'remora'); | 390 'deviceRequisitionRemoraPromptText', 'remora'); |
| 394 } else if (name == ACCELERATOR_DEVICE_REQUISITION_SHARK) { | 391 } else if (name == ACCELERATOR_DEVICE_REQUISITION_SHARK) { |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 */ | 1066 */ |
| 1070 DisplayManager.refocusCurrentPod = function() { | 1067 DisplayManager.refocusCurrentPod = function() { |
| 1071 $('pod-row').refocusCurrentPod(); | 1068 $('pod-row').refocusCurrentPod(); |
| 1072 }; | 1069 }; |
| 1073 | 1070 |
| 1074 // Export | 1071 // Export |
| 1075 return { | 1072 return { |
| 1076 DisplayManager: DisplayManager | 1073 DisplayManager: DisplayManager |
| 1077 }; | 1074 }; |
| 1078 }); | 1075 }); |
| OLD | NEW |