| 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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 // If types are same both subtypes are defined of both are undefined. | 919 // If types are same both subtypes are defined of both are undefined. |
| 920 result = this.collator_.compare(a.cachedFileType_.subtype || '', | 920 result = this.collator_.compare(a.cachedFileType_.subtype || '', |
| 921 b.cachedFileType_.subtype || ''); | 921 b.cachedFileType_.subtype || ''); |
| 922 if (result != 0) | 922 if (result != 0) |
| 923 return result; | 923 return result; |
| 924 | 924 |
| 925 return this.collator_.compare(a.name, b.name); | 925 return this.collator_.compare(a.name, b.name); |
| 926 }; | 926 }; |
| 927 | 927 |
| 928 FileManager.prototype.refocus = function() { | 928 FileManager.prototype.refocus = function() { |
| 929 this.document_.querySelector('[tabindex="0"]').focus(); | 929 if (this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE) |
| 930 this.filenameInput_.focus(); |
| 931 else |
| 932 this.document_.querySelector('[tabindex="0"]').focus(); |
| 930 }; | 933 }; |
| 931 | 934 |
| 932 FileManager.prototype.showButter = function(message, opt_options) { | 935 FileManager.prototype.showButter = function(message, opt_options) { |
| 933 var butter = this.document_.createElement('div'); | 936 var butter = this.document_.createElement('div'); |
| 934 butter.className = 'butter-bar'; | 937 butter.className = 'butter-bar'; |
| 935 butter.style.top = '-30px'; | 938 butter.style.top = '-30px'; |
| 936 this.dialogDom_.appendChild(butter); | 939 this.dialogDom_.appendChild(butter); |
| 937 | 940 |
| 938 var self = this; | 941 var self = this; |
| 939 | 942 |
| (...skipping 3050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3990 }); | 3993 }); |
| 3991 }, onError); | 3994 }, onError); |
| 3992 | 3995 |
| 3993 function onError(err) { | 3996 function onError(err) { |
| 3994 console.log('Error while checking free space: ' + err); | 3997 console.log('Error while checking free space: ' + err); |
| 3995 setTimeout(doCheck, 1000 * 60); | 3998 setTimeout(doCheck, 1000 * 60); |
| 3996 } | 3999 } |
| 3997 } | 4000 } |
| 3998 } | 4001 } |
| 3999 })(); | 4002 })(); |
| OLD | NEW |