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 16 matching lines...) Expand all Loading... |
27 'easy-unlock-turn-off-overlay'); | 27 'easy-unlock-turn-off-overlay'); |
28 } | 28 } |
29 | 29 |
30 cr.addSingletonGetter(EasyUnlockTurnOffOverlay); | 30 cr.addSingletonGetter(EasyUnlockTurnOffOverlay); |
31 | 31 |
32 EasyUnlockTurnOffOverlay.prototype = { | 32 EasyUnlockTurnOffOverlay.prototype = { |
33 // Inherit EasyUnlockTurnOffOverlay from Page. | 33 // Inherit EasyUnlockTurnOffOverlay from Page. |
34 __proto__: Page.prototype, | 34 __proto__: Page.prototype, |
35 | 35 |
36 /** Current UI state */ | 36 /** Current UI state */ |
37 uiState_: UIState.UNKNKOWN, | 37 uiState_: UIState.UNKNOWN, |
38 get uiState() { | 38 get uiState() { |
39 return this.uiState_; | 39 return this.uiState_; |
40 }, | 40 }, |
41 set uiState(newUiState) { | 41 set uiState(newUiState) { |
42 if (newUiState == this.uiState_) | 42 if (newUiState == this.uiState_) |
43 return; | 43 return; |
44 | 44 |
45 this.uiState_ = newUiState; | 45 this.uiState_ = newUiState; |
46 switch (this.uiState_) { | 46 switch (this.uiState_) { |
47 case UIState.OFFLINE: | 47 case UIState.OFFLINE: |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 */ | 184 */ |
185 EasyUnlockTurnOffOverlay.updateUIState = function(newState) { | 185 EasyUnlockTurnOffOverlay.updateUIState = function(newState) { |
186 EasyUnlockTurnOffOverlay.getInstance().uiState = newState; | 186 EasyUnlockTurnOffOverlay.getInstance().uiState = newState; |
187 }; | 187 }; |
188 | 188 |
189 // Export | 189 // Export |
190 return { | 190 return { |
191 EasyUnlockTurnOffOverlay: EasyUnlockTurnOffOverlay | 191 EasyUnlockTurnOffOverlay: EasyUnlockTurnOffOverlay |
192 }; | 192 }; |
193 }); | 193 }); |
OLD | NEW |