| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 login.createScreen('EncryptionMigrationScreen', 'encryption-migration', | 5 login.createScreen('EncryptionMigrationScreen', 'encryption-migration', |
| 6 function() { | 6 function() { |
| 7 return { | 7 return { |
| 8 EXTERNAL_API: [ | 8 EXTERNAL_API: [ |
| 9 'setUIState', | 9 'setUIState', |
| 10 'setMigrationProgress', | 10 'setMigrationProgress', |
| 11 'setIsResuming', |
| 11 ], | 12 ], |
| 12 | 13 |
| 13 /** | 14 /** |
| 14 * Ignore any accelerators the user presses on this screen. | 15 * Ignore any accelerators the user presses on this screen. |
| 15 */ | 16 */ |
| 16 ignoreAccelerators: true, | 17 ignoreAccelerators: true, |
| 17 | 18 |
| 18 /** @override */ | 19 /** @override */ |
| 19 decorate: function() { | 20 decorate: function() { |
| 20 var encryptionMigration = $('encryption-migration-element'); | 21 var encryptionMigration = $('encryption-migration-element'); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 50 $('encryption-migration-element').uiState = state; | 51 $('encryption-migration-element').uiState = state; |
| 51 }, | 52 }, |
| 52 | 53 |
| 53 /** | 54 /** |
| 54 * Updates the migration progress. | 55 * Updates the migration progress. |
| 55 * @param {number} progress The progress of migration in range [0, 1]. | 56 * @param {number} progress The progress of migration in range [0, 1]. |
| 56 */ | 57 */ |
| 57 setMigrationProgress: function(progress) { | 58 setMigrationProgress: function(progress) { |
| 58 $('encryption-migration-element').progress = progress; | 59 $('encryption-migration-element').progress = progress; |
| 59 }, | 60 }, |
| 61 |
| 62 /** |
| 63 * Updates the migration screen based on whether the migration process is |
| 64 * resuming the previous one. |
| 65 * @param {boolean} isResuming |
| 66 */ |
| 67 setIsResuming: function(isResuming) { |
| 68 $('encryption-migration-element').isResuming = isResuming; |
| 69 }, |
| 60 }; | 70 }; |
| 61 }); | 71 }); |
| OLD | NEW |