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

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

Issue 7227025: ntp4: fix app context menu z-order (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added bug ref Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 1460
1461 function maybeDoneLoading() { 1461 function maybeDoneLoading() {
1462 if (mostVisited.data && apps.loaded) 1462 if (mostVisited.data && apps.loaded)
1463 document.body.classList.remove('loading'); 1463 document.body.classList.remove('loading');
1464 } 1464 }
1465 1465
1466 function isDoneLoading() { 1466 function isDoneLoading() {
1467 return !document.body.classList.contains('loading'); 1467 return !document.body.classList.contains('loading');
1468 } 1468 }
1469 1469
1470 // Initialize the listener for the "hide this" link on the apps promo. We do
1471 // this outside of getAppsCallback because it only needs to be done once per
1472 // NTP load.
1473 document.addEventListener('DOMContentLoaded', function() { 1470 document.addEventListener('DOMContentLoaded', function() {
1471 cr.enablePlatformSpecificCSSRules();
1472
1473 // Initialize the listener for the "hide this" link on the apps promo. We do
1474 // this outside of getAppsCallback because it only needs to be done once per
1475 // NTP load.
1474 $('apps-promo-hide').addEventListener('click', function() { 1476 $('apps-promo-hide').addEventListener('click', function() {
1475 chrome.send('hideAppsPromo', []); 1477 chrome.send('hideAppsPromo', []);
1476 document.documentElement.classList.remove('apps-promo-visible'); 1478 document.documentElement.classList.remove('apps-promo-visible');
1477 layoutSections(); 1479 layoutSections();
1478 }); 1480 });
1479 }); 1481 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/bookmark_manager/js/main.js ('k') | chrome/browser/resources/ntp4/apps_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698