Index: chrome/browser/resources/ntp_search/most_visited_page.js |
diff --git a/chrome/browser/resources/ntp_search/most_visited_page.js b/chrome/browser/resources/ntp_search/most_visited_page.js |
index d5a0b5235ffa196510961db028a44686bea1704e..329a6227ac1316908e549802344b791c2e076521 100644 |
--- a/chrome/browser/resources/ntp_search/most_visited_page.js |
+++ b/chrome/browser/resources/ntp_search/most_visited_page.js |
@@ -56,14 +56,18 @@ cr.define('ntp', function() { |
* Update the appearance of this tile according to |data|. |
* @param {Object} data A dictionary of relevant data for the page. |
*/ |
- setData: function(data) { |
+ set data(data) { |
+ Object.getOwnPropertyDescriptor(Thumbnail.prototype, 'data').set.apply( |
+ this, arguments); |
+ |
if (this.classList.contains('blacklisted') && data) { |
// Animate appearance of new tile. |
this.classList.add('new-tile-contents'); |
} |
this.classList.remove('blacklisted'); |
- |
- Thumbnail.prototype.setData.apply(this, arguments); |
+ }, |
+ get data() { |
+ return this.data_; |
Dan Beam
2012/12/07 05:05:31
nit: what does this offer over Thumbnail.data / do
pedro (no code reviews)
2012/12/07 21:54:55
Yes, I do need this. I might be missing something
Dan Beam
2012/12/07 22:31:07
in JS, "private" members exist on all sub classes
pedro (no code reviews)
2012/12/10 19:44:43
I guess I wasn't clear enough in my previous comme
|
}, |
/** |