Index: chrome/browser/resources/ntp4/trash.js |
diff --git a/chrome/browser/resources/ntp4/trash.js b/chrome/browser/resources/ntp4/trash.js |
index e554e2eceb0e09a86a23b363e2d5a4e586e998b6..4db841db50b3b226c406ed7eed5ec8ab8cf7d27b 100644 |
--- a/chrome/browser/resources/ntp4/trash.js |
+++ b/chrome/browser/resources/ntp4/trash.js |
@@ -33,11 +33,7 @@ cr.define('ntp4', function() { |
if (!tile) |
return false; |
- var app = tile.querySelector('.app'); |
- if (!app) |
- return false; |
- |
- return app.appData.can_uninstall; |
+ return tile.firstChild.canBeRemoved(); |
}, |
/** |
@@ -67,15 +63,8 @@ cr.define('ntp4', function() { |
e.preventDefault(); |
var tile = ntp4.getCurrentlyDraggingTile(); |
- var app = tile.querySelector('.app'); |
- if (!app) |
- return; |
- |
- chrome.send('uninstallApp', [app.appData.id, true]); |
- |
- var page = tile.tilePage; |
- tile.parentNode.removeChild(tile); |
- page.cleanupDrag(); |
+ tile.firstChild.removeFromChrome(); |
+ tile.landedOnTrash = true; |
}, |
/** |