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(); |
+ } |
+}); |