Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: chrome/browser/resources/chromeos/login/screen_wrong_hwid.js

Issue 12213110: Implemented screen notifying users about malformed HWID. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed log message. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
+ };
+});
+

Powered by Google App Engine
This is Rietveld 408576698