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

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

Issue 8637001: [NTP4] Auto-deletion of empty apps panes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding back erroneously removed ; Created 9 years 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/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index aff343f09984b9e3874649c2c42460346f41b955..5659515c8e10b5a412f23fd097682bc90ca3a414 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -35,7 +35,7 @@ cr.define('ntp4', function() {
function AppContextMenu() {
this.__proto__ = AppContextMenu.prototype;
this.initialize();
- };
+ }
cr.addSingletonGetter(AppContextMenu);
AppContextMenu.prototype = {
@@ -255,17 +255,6 @@ 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 = '';
- this.tile.doRemove();
- },
-
- /**
* Set the URL of the icon from |appData_|. This won't actually show the
* icon until loadIcon() is called (for performance reasons; we don't want
* to load icons until we have to).
@@ -559,8 +548,7 @@ cr.define('ntp4', function() {
*/
removeFromChrome: function() {
chrome.send('uninstallApp', [this.appData_.id, true]);
- this.tile.tilePage.removeTile(this.tile, true);
-
+ this.tile.remove(true);
if (this.currentBubbleShowing_)
currentBubbleShowing_.hide();
},
@@ -788,13 +776,13 @@ cr.define('ntp4', function() {
*/
function launchAppAfterEnable(appId) {
chrome.send('launchApp', [appId, APP_LAUNCH.NTP_APP_RE_ENABLE]);
- };
+ }
function appNotificationChanged(id, notification) {
var app = $(id);
if (app) // The app might have been uninstalled.
app.setupNotification_(notification);
- };
+ }
return {
APP_LAUNCH: APP_LAUNCH,
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/nav_dot.js » ('j') | chrome/browser/resources/ntp4/page_list_view.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698