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

Unified Diff: chrome/browser/resources/ntp_search/thumbnail_page.js

Issue 11438009: NTP5: Refactoring appData to use Tile's data implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NTP5: Refactoring appData to use Tile's data implementation Created 8 years 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
« no previous file with comments | « chrome/browser/resources/ntp_search/new_tab.js ('k') | chrome/browser/resources/ntp_search/tile_page.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp_search/thumbnail_page.js
diff --git a/chrome/browser/resources/ntp_search/thumbnail_page.js b/chrome/browser/resources/ntp_search/thumbnail_page.js
index 7a438d674ee672a26c3fef7176bdab85b13ba9e7..f6274fcf1a7607f4fc5bfea40c3e726b1ddb4693 100644
--- a/chrome/browser/resources/ntp_search/thumbnail_page.js
+++ b/chrome/browser/resources/ntp_search/thumbnail_page.js
@@ -13,12 +13,11 @@ cr.define('ntp', function() {
* @constructor
* @extends {Tile}
* @extends {HTMLAnchorElement}
- * @param {Object} config Tile page configuration object.
*/
- function Thumbnail(config) {
+ function Thumbnail() {
var el = cr.doc.createElement('a');
el.__proto__ = Thumbnail.prototype;
- el.initialize(config);
+ el.initialize();
return el;
}
@@ -28,9 +27,8 @@ cr.define('ntp', function() {
/**
* Initializes a Thumbnail.
- * @param {Object} config TilePage configuration object.
*/
- initialize: function(config) {
+ initialize: function() {
Tile.prototype.initialize.apply(this, arguments);
this.classList.add('thumbnail');
this.addEventListener('mouseover', this.handleMouseOver_);
@@ -56,8 +54,9 @@ 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) {
- Tile.prototype.setData.apply(this, arguments);
+ set data(data) {
+ Object.getOwnPropertyDescriptor(Tile.prototype, 'data').set.apply(this,
+ arguments);
this.formatThumbnail_(data);
},
« no previous file with comments | « chrome/browser/resources/ntp_search/new_tab.js ('k') | chrome/browser/resources/ntp_search/tile_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698