[Extensions] Make extension message bubble factory platform-abstract
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / login / screen_wrong_hwid.js
blob202c494275b0e8510cb317cfc68b05b2ec4dadf6
1 // Copyright (c) 2013 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 wrong HWID screen implementation.
7 */
9 login.createScreen('WrongHWIDScreen', 'wrong-hwid', function() {
10 return {
11 /** @override */
12 decorate: function() {
13 $('skip-hwid-warning-link').addEventListener('click', function(event) {
14 chrome.send('wrongHWIDOnSkip');
15 });
16 this.updateLocalizedContent();
19 /**
20 * Updates state of login header so that necessary buttons are displayed.
21 **/
22 onBeforeShow: function(data) {
23 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.WRONG_HWID_WARNING;
26 /**
27 * Updates localized content of the screen that is not updated via template.
29 updateLocalizedContent: function() {
30 $('wrong-hwid-message-content').innerHTML =
31 '<p>' +
32 loadTimeData.getStringF('wrongHWIDMessageFirstPart',
33 '<strong>', '</strong>') +
34 '</p><p>' +
35 loadTimeData.getString('wrongHWIDMessageSecondPart') +
36 '</p>';
39 });