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 /** | 5 /** |
6 * @fileoverview Device disabled screen implementation. | 6 * @fileoverview Device disabled screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('DeviceDisabledScreen', 'device-disabled', function() { | 9 login.createScreen('DeviceDisabledScreen', 'device-disabled', function() { |
10 return { | 10 return { |
11 EXTERNAL_API: [ | 11 EXTERNAL_API: [ |
12 'setMessage' | 12 'setMessage' |
13 ], | 13 ], |
14 | 14 |
15 /** | 15 /** |
16 * Event handler that is invoked just before the screen in shown. | 16 * Event handler that is invoked just before the screen in shown. |
17 */ | 17 */ |
18 onBeforeShow: function() { | 18 onBeforeShow: function() { |
19 $('progress-dots').hidden = true; | 19 $('progress-dots').hidden = true; |
20 }, | 20 }, |
21 | 21 |
22 /** | 22 /** |
23 * Sets the message to show to the user. If |message| is empty, a default | 23 * Sets the message to show to the user. |
24 * message will be shown. | |
25 * @param {string} message The message to show to the user. | 24 * @param {string} message The message to show to the user. |
26 * @private | 25 * @private |
27 */ | 26 */ |
28 setMessage: function(message) { | 27 setMessage: function(message) { |
29 $('device-disabled-message').textContent = | 28 $('device-disabled-message').textContent = message; |
30 message || loadTimeData.getString('deviceDisabledDefaultMessage'); | |
31 } | 29 } |
32 }; | 30 }; |
33 }); | 31 }); |
OLD | NEW |