| OLD | NEW |
| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 } | 279 } |
| 280 function clickHandler(e) { | 280 function clickHandler(e) { |
| 281 chrome.send('reopenTab', [String(data.sessionId)]); | 281 chrome.send('reopenTab', [String(data.sessionId)]); |
| 282 e.preventDefault(); | 282 e.preventDefault(); |
| 283 } | 283 } |
| 284 a.addEventListener('click', clickHandler); | 284 a.addEventListener('click', clickHandler); |
| 285 addClosedMenuEntryWithLink(menu, a); | 285 addClosedMenuEntryWithLink(menu, a); |
| 286 } | 286 } |
| 287 | 287 |
| 288 function saveShownSections() { | 288 function saveShownSections() { |
| 289 chrome.send('setShownSections', [String(shownSections)]); | 289 chrome.send('setShownSections', [shownSections]); |
| 290 } | 290 } |
| 291 | 291 |
| 292 var LayoutMode = { | 292 var LayoutMode = { |
| 293 SMALL: 1, | 293 SMALL: 1, |
| 294 NORMAL: 2 | 294 NORMAL: 2 |
| 295 }; | 295 }; |
| 296 | 296 |
| 297 var layoutMode = useSmallGrid() ? LayoutMode.SMALL : LayoutMode.NORMAL; | 297 var layoutMode = useSmallGrid() ? LayoutMode.SMALL : LayoutMode.NORMAL; |
| 298 | 298 |
| 299 function handleWindowResize() { | 299 function handleWindowResize() { |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 var promoLink = document.querySelector('#apps-promo-text1 a'); | 1400 var promoLink = document.querySelector('#apps-promo-text1 a'); |
| 1401 promoLink.id = 'apps-promo-link'; | 1401 promoLink.id = 'apps-promo-link'; |
| 1402 promoLink.href = localStrings.getString('web_store_url'); | 1402 promoLink.href = localStrings.getString('web_store_url'); |
| 1403 | 1403 |
| 1404 $('apps-promo-hide').addEventListener('click', function() { | 1404 $('apps-promo-hide').addEventListener('click', function() { |
| 1405 chrome.send('hideAppsPromo', []); | 1405 chrome.send('hideAppsPromo', []); |
| 1406 document.documentElement.classList.remove('apps-promo-visible'); | 1406 document.documentElement.classList.remove('apps-promo-visible'); |
| 1407 layoutSections(); | 1407 layoutSections(); |
| 1408 }); | 1408 }); |
| 1409 }); | 1409 }); |
| OLD | NEW |