[Extensions] Make extension message bubble factory platform-abstract
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / login / screen_tpm_error.js
blobff5359a6a2c286734ec1fc09cd4123002dd6a554
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.
5 /**
6 * @fileoverview Offline message screen implementation.
7 */
9 login.createScreen('TPMErrorMessageScreen', 'tpm-error-message', function() {
10 return {
11 EXTERNAL_API: [
12 'show'
15 /**
16 * Buttons in oobe wizard's button strip.
17 * @type {array} Array of Buttons.
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];
30 /**
31 * Show TPM screen.
33 show: function() {
34 Oobe.showScreen({id: SCREEN_TPM_ERROR});
37 });