Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/screen_wrong_hwid.js |
| diff --git a/chrome/browser/resources/chromeos/login/screen_wrong_hwid.js b/chrome/browser/resources/chromeos/login/screen_wrong_hwid.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b5b3f7fe073808b544a38fc28cf7b0c4f0e30cec |
| --- /dev/null |
| +++ b/chrome/browser/resources/chromeos/login/screen_wrong_hwid.js |
| @@ -0,0 +1,56 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
Nikita (slow)
2013/02/11 17:09:03
nit: 2013
dzhioev (left Google)
2013/02/11 23:32:56
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +/** |
| + * @fileoverview wrong HWID screen implementation. |
| + */ |
| + |
| +cr.define('oobe', function() { |
| + /** |
| + * Creates a new screen div. |
| + * @constructor |
| + * @extends {HTMLDivElement} |
| + */ |
| + var WrongHWIDScreen = cr.ui.define('div'); |
| + |
| + /** |
| + * Registers with Oobe. |
| + */ |
| + WrongHWIDScreen.register = function() { |
| + var screen = $('wrong-hwid'); |
| + WrongHWIDScreen.decorate(screen); |
| + Oobe.getInstance().registerScreen(screen); |
| + }; |
| + |
| + WrongHWIDScreen.prototype = { |
| + __proto__: HTMLDivElement.prototype, |
| + |
| + /** @override */ |
| + decorate: function() { |
| + $('skip-hwid-warning-link').addEventListener('click', function(event) { |
| + chrome.send('wrongHWIDOnSkip'); |
| + }); |
| + this.updateLocalizedContent(); |
| + }, |
| + |
| + /** |
| + * Updates localized content of the screen that is not updated via template. |
| + */ |
| + updateLocalizedContent: function() { |
| + $('wrong-hwid-message-content').innerHTML = |
| + '<p>' + |
| + localStrings.getStringF('wrongHWIDMessageFirstPart', |
| + '<strong>', '</strong>') + |
| + '</p><p>' + |
| + localStrings.getString('wrongHWIDMessageSecondPart') + |
| + '</p>'; |
| + }, |
| + |
| + }; |
| + |
| + return { |
| + WrongHWIDScreen: WrongHWIDScreen |
| + }; |
| +}); |
| + |