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

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

Issue 7764013: ntp4: fix app load/unload race condition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/new_tab.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index a81c34399f8767ee419b1e6af00010164b45ac51..d985420dd9998ad852a9d7990d7f5fb6003a0cc1 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -230,6 +230,18 @@ cr.define('ntp4', function() {
},
/**
+ * Removes the app tile from the page. Should be called after the app has
+ * been uninstalled.
+ */
+ remove: function() {
+ // Unset the ID immediately, because the app is already gone. But leave
+ // the tile on the page as it animates out.
+ this.id = '';
+ var tile = findAncestorByClass(this, 'tile');
+ tile.doRemove();
+ },
+
+ /**
* Creates the apps-promo section of the app (should only be called for the
* webstore app).
* @private
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/new_tab.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698