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

Side by Side Diff: chrome/browser/resources/new_new_tab.js

Issue 4708002: Add a histogram for tracking web store promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reorder methods in app_launcher_handler Created 10 years, 1 month 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/extensions/default_apps.cc ('k') | chrome/browser/resources/ntp/apps.js » ('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 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more 5 // To avoid creating tons of unnecessary nodes. We assume we cannot fit more
6 // than this many items in the miniview. 6 // than this many items in the miniview.
7 var MAX_MINIVIEW_ITEMS = 15; 7 var MAX_MINIVIEW_ITEMS = 15;
8 8
9 // Extra spacing at the top of the layout. 9 // Extra spacing at the top of the layout.
10 var LAYOUT_SPACING_TOP = 25; 10 var LAYOUT_SPACING_TOP = 25;
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 } 1199 }
1200 1200
1201 function isDoneLoading() { 1201 function isDoneLoading() {
1202 return !document.body.classList.contains('loading'); 1202 return !document.body.classList.contains('loading');
1203 } 1203 }
1204 1204
1205 // Initialize the apps promo. 1205 // Initialize the apps promo.
1206 document.addEventListener('DOMContentLoaded', function() { 1206 document.addEventListener('DOMContentLoaded', function() {
1207 var promoText1 = $('apps-promo-text1'); 1207 var promoText1 = $('apps-promo-text1');
1208 promoText1.innerHTML = promoText1.textContent; 1208 promoText1.innerHTML = promoText1.textContent;
1209 promoText1.querySelector('a').href = localStrings.getString('web_store_url'); 1209
1210 var promoLink = promoText1.querySelector('a');
1211 promoLink.id = 'apps-promo-link';
1212 promoLink.href = localStrings.getString('web_store_url');
1210 1213
1211 $('apps-promo-hide').addEventListener('click', function() { 1214 $('apps-promo-hide').addEventListener('click', function() {
1212 chrome.send('hideAppsPromo', []); 1215 chrome.send('hideAppsPromo', []);
1213 document.documentElement.classList.remove('apps-promo-visible'); 1216 document.documentElement.classList.remove('apps-promo-visible');
1214 layoutSections(); 1217 layoutSections();
1215 }); 1218 });
1216 }); 1219 });
OLDNEW
« no previous file with comments | « chrome/browser/extensions/default_apps.cc ('k') | chrome/browser/resources/ntp/apps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698