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

Side by Side Diff: chrome/browser/resources/ntp4/tile_page.js

Issue 9549016: [NTP4] Overlap of apps in NTP when deleting and reinstalling app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('ntp', function() { 5 cr.define('ntp', function() {
6 'use strict'; 6 'use strict';
7 7
8 // We can't pass the currently dragging tile via dataTransfer because of 8 // We can't pass the currently dragging tile via dataTransfer because of
9 // http://crbug.com/31037 9 // http://crbug.com/31037
10 var currentlyDraggingTile = null; 10 var currentlyDraggingTile = null;
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 }, 291 },
292 292
293 /** 293 /**
294 * Called when an app is removed from Chrome. Animates its disappearance. 294 * Called when an app is removed from Chrome. Animates its disappearance.
295 * @param {boolean=} opt_animate Whether the animation should be animated. 295 * @param {boolean=} opt_animate Whether the animation should be animated.
296 */ 296 */
297 doRemove: function(opt_animate) { 297 doRemove: function(opt_animate) {
298 if (opt_animate) 298 if (opt_animate)
299 this.firstChild.classList.add('removing-tile-contents'); 299 this.firstChild.classList.add('removing-tile-contents');
300 else 300 else
301 this.parentNode.removeChild(this); 301 this.tilePage.removeTile(this, false);
302 }, 302 },
303 303
304 /** 304 /**
305 * Callback for the webkitAnimationEnd event on the tile's contents. 305 * Callback for the webkitAnimationEnd event on the tile's contents.
306 * @param {Event} e The event object. 306 * @param {Event} e The event object.
307 */ 307 */
308 onContentsAnimationEnd_: function(e) { 308 onContentsAnimationEnd_: function(e) {
309 if (this.firstChild.classList.contains('new-tile-contents')) 309 if (this.firstChild.classList.contains('new-tile-contents'))
310 this.firstChild.classList.remove('new-tile-contents'); 310 this.firstChild.classList.remove('new-tile-contents');
311 if (this.firstChild.classList.contains('removing-tile-contents')) 311 if (this.firstChild.classList.contains('removing-tile-contents'))
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 assert(false); 1320 assert(false);
1321 }, 1321 },
1322 }; 1322 };
1323 1323
1324 return { 1324 return {
1325 getCurrentlyDraggingTile: getCurrentlyDraggingTile, 1325 getCurrentlyDraggingTile: getCurrentlyDraggingTile,
1326 setCurrentDropEffect: setCurrentDropEffect, 1326 setCurrentDropEffect: setCurrentDropEffect,
1327 TilePage: TilePage, 1327 TilePage: TilePage,
1328 }; 1328 };
1329 }); 1329 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698