OLD | NEW |
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 // Setting the src of an img to an empty string can crash the browser, so we | 5 // Setting the src of an img to an empty string can crash the browser, so we |
6 // use an empty 1x1 gif instead. | 6 // use an empty 1x1 gif instead. |
7 const EMPTY_IMAGE_URI = 'data:image/gif;base64,' | 7 const EMPTY_IMAGE_URI = 'data:image/gif;base64,' |
8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; | 8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; |
9 | 9 |
10 var g_slideshow_data = null; | 10 var g_slideshow_data = null; |
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1746 selection.urls.push(entry.toURL()); | 1746 selection.urls.push(entry.toURL()); |
1747 | 1747 |
1748 if (selection.iconType == null) { | 1748 if (selection.iconType == null) { |
1749 selection.iconType = this.getIconType(entry); | 1749 selection.iconType = this.getIconType(entry); |
1750 } else if (selection.iconType != 'unknown') { | 1750 } else if (selection.iconType != 'unknown') { |
1751 var iconType = this.getIconType(entry); | 1751 var iconType = this.getIconType(entry); |
1752 if (selection.iconType != iconType) | 1752 if (selection.iconType != iconType) |
1753 selection.iconType = 'unknown'; | 1753 selection.iconType = 'unknown'; |
1754 } | 1754 } |
1755 | 1755 |
1756 if (thumbnailCount < MAX_PREVIEW_THUMBAIL_COUNT) { | 1756 if (thumbnailCount < MAX_PREVIEW_THUMBAIL_COUNT && entry.isFile) { |
1757 var thumbnail = this.renderThumbnailBox_(entry, true); | 1757 var thumbnail = this.renderThumbnailBox_(entry, true); |
1758 thumbnail.style.zIndex = MAX_PREVIEW_THUMBAIL_COUNT + 1 - i; | 1758 thumbnail.style.zIndex = MAX_PREVIEW_THUMBAIL_COUNT + 1 - i; |
1759 this.previewThumbnails_.appendChild(thumbnail); | 1759 this.previewThumbnails_.appendChild(thumbnail); |
1760 thumbnailCount++; | 1760 thumbnailCount++; |
1761 } | 1761 } |
1762 | 1762 |
1763 selection.totalCount++; | 1763 selection.totalCount++; |
1764 | 1764 |
1765 if (entry.isFile) { | 1765 if (entry.isFile) { |
1766 selection.fileCount += 1; | 1766 selection.fileCount += 1; |
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3736 }); | 3736 }); |
3737 }, onError); | 3737 }, onError); |
3738 | 3738 |
3739 function onError(err) { | 3739 function onError(err) { |
3740 console.log('Error while checking free space: ' + err); | 3740 console.log('Error while checking free space: ' + err); |
3741 setTimeout(doCheck, 1000 * 60); | 3741 setTimeout(doCheck, 1000 * 60); |
3742 } | 3742 } |
3743 } | 3743 } |
3744 } | 3744 } |
3745 })(); | 3745 })(); |
OLD | NEW |