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

Unified Diff: chrome/browser/resources/ntp4/tile_page.js

Issue 7713026: [ntp4] Observe and process bookmark change notifications from the bookmarks data model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: code review changes; rebase Created 9 years, 4 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/ntp4/tile_page.js
===================================================================
--- chrome/browser/resources/ntp4/tile_page.js (revision 98269)
+++ chrome/browser/resources/ntp4/tile_page.js (working copy)
@@ -417,6 +417,10 @@
this.onCardChanged.bind(this));
},
+ get tiles() {
+ return this.tileElements_;
+ },
+
get tileCount() {
return this.tileElements_.length;
},
@@ -490,9 +494,11 @@
* Removes the given tile and animates the respositioning of the other
* tiles.
* @param {HTMLElement} tile The tile to remove from |tileGrid_|.
+ * @param {?boolean} animate If true, tiles will animate.
*/
- removeTile: function(tile) {
- this.classList.add('animating-tile-page');
+ removeTile: function(tile, animate) {
+ if (animate)
+ this.classList.add('animating-tile-page');
var index = Array.prototype.indexOf.call(this.tileElements_, tile);
tile.parentNode.removeChild(tile);
this.calculateLayoutValues_();

Powered by Google App Engine
This is Rietveld 408576698