1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5/**
6 * @fileoverview Offline message screen implementation.
7 */
8
9login.createScreen('TPMErrorMessageScreen', 'tpm-error-message', function() {
10  return {
11    EXTERNAL_API: [
12      'show'
13    ],
14
15    /**
16     * Buttons in oobe wizard's button strip.
17     * @type {array} Array of Buttons.
18     */
19    get buttons() {
20      var rebootButton = this.ownerDocument.createElement('button');
21      rebootButton.id = 'reboot-button';
22      rebootButton.textContent =
23        loadTimeData.getString('errorTpmFailureRebootButton');
24      rebootButton.addEventListener('click', function() {
25          chrome.send('rebootSystem');
26      });
27      return [rebootButton];
28    },
29
30    /**
31     * Show TPM screen.
32     */
33    show: function() {
34      Oobe.showScreen({id: SCREEN_TPM_ERROR});
35    }
36  };
37});
38
39