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

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

Issue 12985002: Add a new App launcher promo to the apps page / NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OWNERS review round 4. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/ntp4/page_list_view.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/new_tab.js
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
index a930f2fc853fb44b51aaa6df2f577ef20ec9ad14..a0da4fe605f2c0b6aa0693bdce3f2273f1cef908 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -127,8 +127,13 @@ cr.define('ntp', function() {
sectionsToWaitFor = 0;
if (loadTimeData.getBoolean('showMostvisited'))
sectionsToWaitFor++;
- if (loadTimeData.getBoolean('showApps'))
+ if (loadTimeData.getBoolean('showApps')) {
sectionsToWaitFor++;
+ if (loadTimeData.getBoolean('showAppLauncherPromo')) {
+ $('app-launcher-promo-close-button').addEventListener('click',
+ function() { chrome.send('stopShowingAppLauncherPromo'); });
+ }
+ }
if (loadTimeData.getBoolean('isDiscoveryInNTPEnabled'))
sectionsToWaitFor++;
measureNavDots();
@@ -627,6 +632,11 @@ cr.define('ntp', function() {
return newTabView.appsPrefChangedCallback.apply(newTabView, arguments);
}
+ function appLauncherPromoPrefChangeCallback() {
+ return newTabView.appLauncherPromoPrefChangeCallback.apply(newTabView,
+ arguments);
+ }
+
function appsReordered() {
return newTabView.appsReordered.apply(newTabView, arguments);
}
@@ -670,6 +680,7 @@ cr.define('ntp', function() {
appMoved: appMoved,
appRemoved: appRemoved,
appsPrefChangeCallback: appsPrefChangeCallback,
+ appLauncherPromoPrefChangeCallback: appLauncherPromoPrefChangeCallback,
enterRearrangeMode: enterRearrangeMode,
getAppsCallback: getAppsCallback,
getAppsPageIndex: getAppsPageIndex,
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/ntp4/page_list_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698