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

Side by Side Diff: chrome/browser/resources/ntp/apps.js

Issue 6162006: Changes to default apps promo per ui leads: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var MAX_APPS_PER_ROW = []; 5 var MAX_APPS_PER_ROW = [];
6 MAX_APPS_PER_ROW[LayoutMode.SMALL] = 4; 6 MAX_APPS_PER_ROW[LayoutMode.SMALL] = 4;
7 MAX_APPS_PER_ROW[LayoutMode.NORMAL] = 6; 7 MAX_APPS_PER_ROW[LayoutMode.NORMAL] = 6;
8 8
9 // The URL prefix used in the app link 'ping' attributes. 9 // The URL prefix used in the app link 'ping' attributes.
10 var PING_APP_LAUNCH_PREFIX = 'record-app-launch'; 10 var PING_APP_LAUNCH_PREFIX = 'record-app-launch';
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } else { 71 } else {
72 appsSection.classList.remove('disabled'); 72 appsSection.classList.remove('disabled');
73 } 73 }
74 addClosedMenuFooter(apps.menu, 'apps', MINIMIZED_APPS, Section.APPS); 74 addClosedMenuFooter(apps.menu, 'apps', MINIMIZED_APPS, Section.APPS);
75 75
76 apps.loaded = true; 76 apps.loaded = true;
77 if (apps.showPromo) 77 if (apps.showPromo)
78 document.documentElement.classList.add('apps-promo-visible'); 78 document.documentElement.classList.add('apps-promo-visible');
79 else 79 else
80 document.documentElement.classList.remove('apps-promo-visible'); 80 document.documentElement.classList.remove('apps-promo-visible');
81 $('apps-promo-link').setAttribute('ping', appsPromoPing); 81
82 var appsPromoLink = $('apps-promo-link');
83 if (appsPromoLink)
84 appsPromoLink.setAttribute('ping', appsPromoPing);
82 maybeDoneLoading(); 85 maybeDoneLoading();
83 86
84 if (isDoneLoading()) { 87 if (isDoneLoading()) {
85 if (!apps.showPromo && data.apps.length >= MAX_APPS_PER_ROW[layoutMode]) 88 if (!apps.showPromo && data.apps.length >= MAX_APPS_PER_ROW[layoutMode])
86 webStoreEntry.classList.add('loner'); 89 webStoreEntry.classList.add('loner');
87 else 90 else
88 webStoreEntry.classList.remove('loner'); 91 webStoreEntry.classList.remove('loner');
89 92
90 updateMiniviewClipping(appsMiniview); 93 updateMiniviewClipping(appsMiniview);
91 layoutSections(); 94 layoutSections();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 createWebStoreClosedMenuElement: function() { 357 createWebStoreClosedMenuElement: function() {
355 var a = document.createElement('a'); 358 var a = document.createElement('a');
356 a.textContent = localStrings.getString('web_store_title'); 359 a.textContent = localStrings.getString('web_store_title');
357 a.href = localStrings.getString('web_store_url'); 360 a.href = localStrings.getString('web_store_url');
358 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16'); 361 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16');
359 a.className = 'item'; 362 a.className = 'item';
360 return a; 363 return a;
361 } 364 }
362 }; 365 };
363 })(); 366 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/common/extensions/extension_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698