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

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

Issue 7572029: ntp4: hook up 'no thanks' app promo link. (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/ui/webui/ntp/app_launcher_handler.cc » ('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 24a58a7554af0b87dfa81ba8324e06c20cef43a3..d7374c48f783c3635c9b30f1d2ff85df41a3adbb 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -231,12 +231,24 @@ cr.define('ntp4', function() {
this.appsPromoHide_ =
this.appsPromoExtras_.querySelector('.apps-promo-hide');
+ this.appsPromoHide_.addEventListener('click',
+ this.onHidePromoClicked_.bind(this));
+
this.appendChild(this.appsPromoExtras_);
this.appsPromoExtras_.hidden = false;
// TODO(estade): A ping url needs to be set for the app icon.
},
/**
+ * Handles when the "No, thanks" promo link is clicked.
+ * @private
+ */
+ onHidePromoClicked_: function(e) {
+ chrome.send('hideAppsPromo');
+ this.setAppsPromoData(null);
+ },
+
+ /**
* Sets the apps promo appearance. If |data| is null, there is no promo. If
* |data| is non-null, it contains strings to be shown for the promo. The
* promo is only shown when the webstore app icon is alone on a page.
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698