OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 /** |
| 6 * @fileoverview wrong HWID screen implementation. |
| 7 */ |
| 8 |
| 9 cr.define('oobe', function() { |
| 10 /** |
| 11 * Creates a new screen div. |
| 12 * @constructor |
| 13 * @extends {HTMLDivElement} |
| 14 */ |
| 15 var WrongHWIDScreen = cr.ui.define('div'); |
| 16 |
| 17 /** |
| 18 * Registers with Oobe. |
| 19 */ |
| 20 WrongHWIDScreen.register = function() { |
| 21 var screen = $('wrong-hwid'); |
| 22 WrongHWIDScreen.decorate(screen); |
| 23 Oobe.getInstance().registerScreen(screen); |
| 24 }; |
| 25 |
| 26 WrongHWIDScreen.prototype = { |
| 27 __proto__: HTMLDivElement.prototype, |
| 28 |
| 29 /** @override */ |
| 30 decorate: function() { |
| 31 $('skip-hwid-warning-link').addEventListener('click', function(event) { |
| 32 chrome.send('wrongHWIDOnSkip'); |
| 33 }); |
| 34 this.updateLocalizedContent(); |
| 35 }, |
| 36 |
| 37 /** |
| 38 * Updates localized content of the screen that is not updated via template. |
| 39 */ |
| 40 updateLocalizedContent: function() { |
| 41 $('wrong-hwid-message-content').innerHTML = |
| 42 '<p>' + |
| 43 localStrings.getStringF('wrongHWIDMessageFirstPart', |
| 44 '<strong>', '</strong>') + |
| 45 '</p><p>' + |
| 46 localStrings.getString('wrongHWIDMessageSecondPart') + |
| 47 '</p>'; |
| 48 }, |
| 49 |
| 50 }; |
| 51 |
| 52 return { |
| 53 WrongHWIDScreen: WrongHWIDScreen |
| 54 }; |
| 55 }); |
| 56 |
OLD | NEW |