| 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 Polymer({ | 5 Polymer({ |
| 6 is: 'host-pairing-page', | 6 is: 'host-pairing-page', |
| 7 | 7 |
| 8 behaviors: [Polymer.NeonAnimatableBehavior] | 8 behaviors: [Polymer.NeonAnimatableBehavior] |
| 9 }); | 9 }); |
| 10 | 10 |
| 11 Polymer((function() { | 11 Polymer((function() { |
| 12 'use strict'; | 12 'use strict'; |
| 13 | 13 |
| 14 /** @const */ var CALLBACK_CONTEXT_READY = 'contextReady'; | 14 /** @const */ var CALLBACK_CONTEXT_READY = 'contextReady'; |
| 15 | 15 |
| 16 return { | 16 return { |
| 17 is: 'host-pairing-screen', | 17 is: 'host-pairing-screen', |
| 18 | 18 |
| 19 behaviors: [login.OobeScreenBehavior], | 19 behaviors: [login.OobeScreenBehavior], |
| 20 | 20 |
| 21 onBeforeShow: function() { | 21 onBeforeShow: function() { |
| 22 Oobe.getInstance().headerHidden = true; | 22 Oobe.getInstance().headerHidden = true; |
| 23 }, | 23 }, |
| 24 | 24 |
| 25 /** @override */ | 25 /** @override */ |
| 26 initialize: function() { | 26 initialize: function() { |
| 27 ['code', | 27 ['code', |
| 28 'deviceName', | 28 'deviceName', |
| 29 'enrollmentDomain', | 29 'enrollmentDomain', |
| 30 'page'].forEach(this.registerBoundContextField, this); | 30 'page', |
| 31 'enrollmentError'].forEach(this.registerBoundContextField, this); |
| 31 this.send(CALLBACK_CONTEXT_READY); | 32 this.send(CALLBACK_CONTEXT_READY); |
| 32 }, | 33 }, |
| 33 | 34 |
| 34 i18n: function(args) { | 35 i18n: function(args) { |
| 35 return loadTimeData.getStringF.apply(loadTimeData, args); | 36 return loadTimeData.getStringF.apply(loadTimeData, args); |
| 36 }, | 37 }, |
| 37 | 38 |
| 38 getEnrollmentStepTitle_: function(enrollmentDomain) { | 39 getEnrollmentStepTitle_: function(enrollmentDomain) { |
| 39 return this.i18n(['loginHostPairingScreenEnrollingTitle', | 40 return this.i18n(['loginHostPairingScreenEnrollingTitle', |
| 40 enrollmentDomain]); | 41 enrollmentDomain]); |
| 41 } | 42 } |
| 42 }; | 43 }; |
| 43 })()); | 44 })()); |
| OLD | NEW |