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

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

Issue 1179323005: Polymer upgraded to 1.0 in login flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@polymer_pre_migration
Patch Set: Comments addressed. Created 5 years, 6 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/notification_card.js
diff --git a/chrome/browser/resources/chromeos/login/notification_card.js b/chrome/browser/resources/chromeos/login/notification_card.js
index edc91a8bf2f2cc7d96c7a80e4a4729cba5c8e5e2..d11f58545d44d437dff3c9ac9ae22e9858eb3b0d 100644
--- a/chrome/browser/resources/chromeos/login/notification_card.js
+++ b/chrome/browser/resources/chromeos/login/notification_card.js
@@ -2,15 +2,41 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-Polymer('notification-card', (function() {
- return {
- buttonClicked: function() {
- this.fire('buttonclick');
+Polymer({
+ is: 'notification-card',
+
+ properties: {
+ buttonLabel: {
+ type: String,
+ value: ''
+ },
+
+ linkLabel: {
+ type: String,
+ value: ''
},
- linkClicked: function(e) {
- this.fire('linkclick');
- e.preventDefault();
+ type: {
+ type: String,
+ value: ''
}
- };
-})());
+ },
+
+ iconNameByType_: function(type) {
+ if (type == 'fail')
+ return 'warning';
+ if (type == 'success')
+ return 'done';
+ console.error('Unknown type "' + type + '".');
+ return '';
+ },
+
+ buttonClicked_: function() {
+ this.fire('buttonclick');
+ },
+
+ linkClicked_: function(e) {
+ this.fire('linkclick');
+ e.preventDefault();
+ }
+});

Powered by Google App Engine
This is Rietveld 408576698