| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 Polymer('oobe-screen', (function() { | 5 Polymer('oobe-screen', (function() { |
| 6 /** @const */ var CALLBACK_USER_ACTED = 'userActed'; | 6 /** @const */ var CALLBACK_USER_ACTED = 'userActed'; |
| 7 | 7 |
| 8 function doNothing() {}; | 8 function doNothing() {}; |
| 9 | 9 |
| 10 return { | 10 return { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 args = [args]; | 60 args = [args]; |
| 61 args[0] = 'login_' + this.name + '_' + args[0]; | 61 args[0] = 'login_' + this.name + '_' + args[0]; |
| 62 return loadTimeData.getStringF.apply(loadTimeData, args); | 62 return loadTimeData.getStringF.apply(loadTimeData, args); |
| 63 }, | 63 }, |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 * Called by login.Screen when the screen is beeing registered. | 66 * Called by login.Screen when the screen is beeing registered. |
| 67 */ | 67 */ |
| 68 decorate: function(screen) { | 68 decorate: function(screen) { |
| 69 this.screen_ = screen; | 69 this.screen_ = screen; |
| 70 screen.initialize(); | |
| 71 this.context = screen.screenContext_; | 70 this.context = screen.screenContext_; |
| 72 this.C = this.context.storage_; | 71 this.C = this.context.storage_; |
| 73 this.contextObservers_ = {}; | 72 this.contextObservers_ = {}; |
| 74 var self = this; | 73 var self = this; |
| 75 if (this.ready_) { | 74 if (this.ready_) { |
| 76 this.initialize(); | 75 this.initialize(); |
| 77 } else { | 76 } else { |
| 78 this.decorate_ = true; | 77 this.decorate_ = true; |
| 79 } | 78 } |
| 80 }, | 79 }, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 */ | 206 */ |
| 208 getPropertyNameOf_: function(value) { | 207 getPropertyNameOf_: function(value) { |
| 209 for (var key in this) | 208 for (var key in this) |
| 210 if (this[key] === value) | 209 if (this[key] === value) |
| 211 return key; | 210 return key; |
| 212 return ''; | 211 return ''; |
| 213 } | 212 } |
| 214 }; | 213 }; |
| 215 })()); | 214 })()); |
| 216 | 215 |
| OLD | NEW |