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 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3062 return; | 3062 return; |
3063 } | 3063 } |
3064 | 3064 |
3065 // Otherwise, use the provided list of root subdirectories, since the | 3065 // Otherwise, use the provided list of root subdirectories, since the |
3066 // real local filesystem root directory (the one we use outside the | 3066 // real local filesystem root directory (the one we use outside the |
3067 // harness) can't be enumerated yet. | 3067 // harness) can't be enumerated yet. |
3068 var spliceArgs = [].slice.call(this.rootEntries_); | 3068 var spliceArgs = [].slice.call(this.rootEntries_); |
3069 spliceArgs.unshift(0, 0); // index, deleteCount | 3069 spliceArgs.unshift(0, 0); // index, deleteCount |
3070 this.dataModel_.splice.apply(this.dataModel_, spliceArgs); | 3070 this.dataModel_.splice.apply(this.dataModel_, spliceArgs); |
3071 | 3071 |
3072 rescanDone(); | 3072 if (opt_callback) |
| 3073 opt_callback(); |
3073 }; | 3074 }; |
3074 | 3075 |
3075 FileManager.prototype.findListItem_ = function(event) { | 3076 FileManager.prototype.findListItem_ = function(event) { |
3076 var node = event.srcElement; | 3077 var node = event.srcElement; |
3077 while (node) { | 3078 while (node) { |
3078 if (node.tagName == 'LI') | 3079 if (node.tagName == 'LI') |
3079 break; | 3080 break; |
3080 node = node.parentNode; | 3081 node = node.parentNode; |
3081 } | 3082 } |
3082 | 3083 |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3735 }); | 3736 }); |
3736 }, onError); | 3737 }, onError); |
3737 | 3738 |
3738 function onError(err) { | 3739 function onError(err) { |
3739 console.log('Error while checking free space: ' + err); | 3740 console.log('Error while checking free space: ' + err); |
3740 setTimeout(doCheck, 1000 * 60); | 3741 setTimeout(doCheck, 1000 * 60); |
3741 } | 3742 } |
3742 } | 3743 } |
3743 } | 3744 } |
3744 })(); | 3745 })(); |
OLD | NEW |