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

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

Issue 6183005: Merge 69758 - Do not show apps section until default apps are installed.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: 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.html ('k') | no next file » | 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 addClosedMenuEntryWithLink(apps.menu, apps.createClosedMenuElement(app)); 58 addClosedMenuEntryWithLink(apps.menu, apps.createClosedMenuElement(app));
59 }); 59 });
60 if (data.apps.length < MAX_MINIVIEW_ITEMS) { 60 if (data.apps.length < MAX_MINIVIEW_ITEMS) {
61 webStoreMiniEntry = apps.createWebStoreMiniElement(); 61 webStoreMiniEntry = apps.createWebStoreMiniElement();
62 webStoreEntry.querySelector('a').setAttribute('ping', appsPromoPing); 62 webStoreEntry.querySelector('a').setAttribute('ping', appsPromoPing);
63 appsMiniview.appendChild(webStoreMiniEntry); 63 appsMiniview.appendChild(webStoreMiniEntry);
64 addClosedMenuEntryWithLink(apps.menu, 64 addClosedMenuEntryWithLink(apps.menu,
65 apps.createWebStoreClosedMenuElement()); 65 apps.createWebStoreClosedMenuElement());
66 } 66 }
67 67
68 if (!(shownSections & MINIMIZED_APPS)) { 68 if (!data.showLauncher || (shownSections & MINIMIZED_APPS)) {
69 appsSection.classList.add('disabled');
70 } else {
69 appsSection.classList.remove('disabled'); 71 appsSection.classList.remove('disabled');
70 } 72 }
71 addClosedMenuFooter(apps.menu, 'apps', MINIMIZED_APPS, Section.APPS); 73 addClosedMenuFooter(apps.menu, 'apps', MINIMIZED_APPS, Section.APPS);
72 74
73 apps.loaded = true; 75 apps.loaded = true;
74 if (apps.showPromo) 76 if (apps.showPromo)
75 document.documentElement.classList.add('apps-promo-visible'); 77 document.documentElement.classList.add('apps-promo-visible');
76 else 78 else
77 document.documentElement.classList.remove('apps-promo-visible'); 79 document.documentElement.classList.remove('apps-promo-visible');
78 $('apps-promo-link').setAttribute('ping', appsPromoPing); 80 $('apps-promo-link').setAttribute('ping', appsPromoPing);
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 createWebStoreClosedMenuElement: function() { 353 createWebStoreClosedMenuElement: function() {
352 var a = document.createElement('a'); 354 var a = document.createElement('a');
353 a.textContent = localStrings.getString('web_store_title'); 355 a.textContent = localStrings.getString('web_store_title');
354 a.href = localStrings.getString('web_store_url'); 356 a.href = localStrings.getString('web_store_url');
355 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16'); 357 a.style.backgroundImage = url('chrome://theme/IDR_PRODUCT_LOGO_16');
356 a.className = 'item'; 358 a.className = 'item';
357 return a; 359 return a;
358 } 360 }
359 }; 361 };
360 })(); 362 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698