Chromium Code Reviews| 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
| 7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
| 8 | 8 |
| 9 // UI state of the turn off overlay. | 9 // UI state of the turn off overlay. |
| 10 // @enum {string} | 10 // @enum {string} |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 this.setSpinnerVisible_(false); | 168 this.setSpinnerVisible_(false); |
| 169 $('easy-unlock-turn-off-confirm').disabled = false; | 169 $('easy-unlock-turn-off-confirm').disabled = false; |
| 170 $('easy-unlock-turn-off-dismiss').hidden = true; | 170 $('easy-unlock-turn-off-dismiss').hidden = true; |
| 171 }, | 171 }, |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 /** | 174 /** |
| 175 * Closes the Easy unlock turn off overlay. | 175 * Closes the Easy unlock turn off overlay. |
| 176 */ | 176 */ |
| 177 EasyUnlockTurnOffOverlay.dismiss = function() { | 177 EasyUnlockTurnOffOverlay.dismiss = function() { |
| 178 PageManager.closeOverlay(); | 178 // TODO(xiyuan): Remove the workaround and call closeOverly directly. |
|
tbarzic
2014/08/19 18:24:22
can you link the bug here (to make it clear what t
xiyuan
2014/08/19 20:12:08
Done.
| |
| 179 $('easy-unlock-turn-off-spinner').hidden = true; | |
| 180 window.setTimeout(function() { | |
| 181 PageManager.closeOverlay(); | |
| 182 }, 100); | |
| 179 }; | 183 }; |
| 180 | 184 |
| 181 /** | 185 /** |
| 182 * Update UI to reflect the turn off operation status. | 186 * Update UI to reflect the turn off operation status. |
| 183 * @param {string} newState The UIState string representing the new state. | 187 * @param {string} newState The UIState string representing the new state. |
| 184 */ | 188 */ |
| 185 EasyUnlockTurnOffOverlay.updateUIState = function(newState) { | 189 EasyUnlockTurnOffOverlay.updateUIState = function(newState) { |
| 186 EasyUnlockTurnOffOverlay.getInstance().uiState = newState; | 190 EasyUnlockTurnOffOverlay.getInstance().uiState = newState; |
| 187 }; | 191 }; |
| 188 | 192 |
| 189 // Export | 193 // Export |
| 190 return { | 194 return { |
| 191 EasyUnlockTurnOffOverlay: EasyUnlockTurnOffOverlay | 195 EasyUnlockTurnOffOverlay: EasyUnlockTurnOffOverlay |
| 192 }; | 196 }; |
| 193 }); | 197 }); |
| OLD | NEW |