OLD | NEW |
1 // Copyright (c) 2010 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; |
11 | 11 |
(...skipping 267 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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 var promoLink = document.querySelector('#apps-promo-text1 a'); | 1420 var promoLink = document.querySelector('#apps-promo-text1 a'); |
1421 promoLink.id = 'apps-promo-link'; | 1421 promoLink.id = 'apps-promo-link'; |
1422 promoLink.href = localStrings.getString('web_store_url'); | 1422 promoLink.href = localStrings.getString('web_store_url'); |
1423 | 1423 |
1424 $('apps-promo-hide').addEventListener('click', function() { | 1424 $('apps-promo-hide').addEventListener('click', function() { |
1425 chrome.send('hideAppsPromo', []); | 1425 chrome.send('hideAppsPromo', []); |
1426 document.documentElement.classList.remove('apps-promo-visible'); | 1426 document.documentElement.classList.remove('apps-promo-visible'); |
1427 layoutSections(); | 1427 layoutSections(); |
1428 }); | 1428 }); |
1429 }); | 1429 }); |
OLD | NEW |