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', |
(...skipping 30 matching lines...) Expand all Loading... |
41 var headerBar = $('login-header-bar'); | 41 var headerBar = $('login-header-bar'); |
42 headerBar.allowCancel = false; | 42 headerBar.allowCancel = false; |
43 headerBar.showGuestButton = false; | 43 headerBar.showGuestButton = false; |
44 headerBar.showCreateSupervisedButton = false; | 44 headerBar.showCreateSupervisedButton = false; |
45 headerBar.signinUIState = SIGNIN_UI_STATE.HIDDEN; | 45 headerBar.signinUIState = SIGNIN_UI_STATE.HIDDEN; |
46 }, | 46 }, |
47 | 47 |
48 /** | 48 /** |
49 * Updates the migration screen by specifying a state which corresponds to | 49 * Updates the migration screen by specifying a state which corresponds to |
50 * a sub step in the migration process. | 50 * a sub step in the migration process. |
51 * @param {number} state The UI state to identify a sub step in migration. | 51 * @param {EncryptionMigrationUIState} state The UI state to identify a sub |
| 52 * step in migration. |
52 */ | 53 */ |
53 setUIState: function(state) { | 54 setUIState: function(state) { |
54 $('encryption-migration-element').uiState = state; | 55 $('encryption-migration-element').uiState = state; |
| 56 |
| 57 // Hide "Shut down" button during migration. |
| 58 $('login-header-bar').showShutdownButton = |
| 59 state != EncryptionMigrationUIState.MIGRATING; |
55 }, | 60 }, |
56 | 61 |
57 /** | 62 /** |
58 * Updates the migration progress. | 63 * Updates the migration progress. |
59 * @param {number} progress The progress of migration in range [0, 1]. | 64 * @param {number} progress The progress of migration in range [0, 1]. |
60 */ | 65 */ |
61 setMigrationProgress: function(progress) { | 66 setMigrationProgress: function(progress) { |
62 $('encryption-migration-element').progress = progress; | 67 $('encryption-migration-element').progress = progress; |
63 }, | 68 }, |
64 | 69 |
(...skipping 29 matching lines...) Expand all Loading... |
94 | 99 |
95 /** | 100 /** |
96 * Updates the string representation of necessary space size. | 101 * Updates the string representation of necessary space size. |
97 * @param {string} space | 102 * @param {string} space |
98 */ | 103 */ |
99 setNecessarySpaceInString: function(space) { | 104 setNecessarySpaceInString: function(space) { |
100 $('encryption-migration-element').necessarySpaceInString = space; | 105 $('encryption-migration-element').necessarySpaceInString = space; |
101 }, | 106 }, |
102 }; | 107 }; |
103 }); | 108 }); |
OLD | NEW |