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', 'deviceName', 'enrollmentDomain', 'page', 'enrollmentError'] |
28 'deviceName', | 28 .forEach(this.registerBoundContextField, this); |
29 'enrollmentDomain', | |
30 'page', | |
31 'enrollmentError'].forEach(this.registerBoundContextField, this); | |
32 this.send(CALLBACK_CONTEXT_READY); | 29 this.send(CALLBACK_CONTEXT_READY); |
33 }, | 30 }, |
34 | 31 |
35 i18n: function(args) { | 32 i18n: function(args) { |
36 return loadTimeData.getStringF.apply(loadTimeData, args); | 33 return loadTimeData.getStringF.apply(loadTimeData, args); |
37 }, | 34 }, |
38 | 35 |
39 getEnrollmentStepTitle_: function(enrollmentDomain) { | 36 getEnrollmentStepTitle_: function(enrollmentDomain) { |
40 return this.i18n(['loginHostPairingScreenEnrollingTitle', | 37 return this.i18n( |
41 enrollmentDomain]); | 38 ['loginHostPairingScreenEnrollingTitle', enrollmentDomain]); |
42 } | 39 } |
43 }; | 40 }; |
44 })()); | 41 })()); |
OLD | NEW |