Chromium Code Reviews| Index: chrome/browser/resources/ntp_search/tile_page.js |
| diff --git a/chrome/browser/resources/ntp_search/tile_page.js b/chrome/browser/resources/ntp_search/tile_page.js |
| index 25db675f724a43b8fd464b847a7092337a60a74d..a55d612a4a0345ef52d5c706995104da9c04df33 100644 |
| --- a/chrome/browser/resources/ntp_search/tile_page.js |
| +++ b/chrome/browser/resources/ntp_search/tile_page.js |
| @@ -78,10 +78,10 @@ cr.define('ntp', function() { |
| }, |
| /** |
| - * Update the appearance of this tile according to |data|. |
| + * The data for this Tile. |
| * @param {Object} data A dictionary of relevant data for the page. |
| */ |
| - setData: function(data) { |
| + set data(data) { |
| // TODO(pedrosimonetti): Remove data.filler usage everywhere. |
| if (!data || data.filler) { |
| if (this.data_) |
| @@ -90,7 +90,7 @@ cr.define('ntp', function() { |
| } |
| this.data_ = data; |
| - } |
| + }, |
| }; |
| var TileGetters = { |
| @@ -110,14 +110,6 @@ cr.define('ntp', function() { |
| assert(this.tileCell); |
| return this.tileCell.index; |
| }, |
| - |
| - /** |
| - * Tile data object. |
| - * @type {Object} |
| - */ |
| - 'data': function() { |
| - return this.data_; |
| - } |
| }; |
| //---------------------------------------------------------------------------- |
| @@ -193,10 +185,7 @@ cr.define('ntp', function() { |
| * @param {boolean=} opt_animate Whether the animation should be animated. |
| */ |
| doRemove: function(opt_animate) { |
| - if (opt_animate) |
| - this.firstChild.classList.add('removing-tile-contents'); |
| - else |
| - this.tilePage.removeTile(this, false); |
| + this.tilePage.removeTile(this.firstChild, false); |
|
Dan Beam
2012/12/05 18:34:05
nit: you may want firstElementChild (which ignores
pedro (no code reviews)
2012/12/05 19:41:34
The tile cell and the tile (its child) are being c
|
| }, |
| }; |
| @@ -481,7 +470,7 @@ cr.define('ntp', function() { |
| if (i >= dataList.length) |
| tile.reset(); |
| else |
| - tile.setData(data); |
| + tile.data = data; |
| } |
| }, |
| @@ -1075,7 +1064,7 @@ cr.define('ntp', function() { |
| if (opt_data) { |
| // If there's data, the new tile will be a real one (not a filler). |
| tile = new tilePage.TileClass(tilePage.config); |
| - tile.setData(opt_data); |
| + tile.data = opt_data; |
| } else { |
| // Otherwise, it will be a fake filler tile. |
| tile = cr.doc.createElement('span'); |