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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 this.onFileTaskExecute_.bind(this)); | 132 this.onFileTaskExecute_.bind(this)); |
133 | 133 |
134 this.initCommands_(); | 134 this.initCommands_(); |
135 this.initDom_(); | 135 this.initDom_(); |
136 this.initDialogType_(); | 136 this.initDialogType_(); |
137 this.setupCurrentDirectory_(); | 137 this.setupCurrentDirectory_(); |
138 | 138 |
139 this.summarizeSelection_(); | 139 this.summarizeSelection_(); |
140 this.updatePreview_(); | 140 this.updatePreview_(); |
141 | 141 |
142 this.dataModel_.sort('cachedMtime_'); | 142 this.dataModel_.sort('cachedMtime_', 'desc'); |
143 | 143 |
144 this.refocus(); | 144 this.refocus(); |
145 | 145 |
146 // Pass all URLs to the metadata reader until we have a correct filter. | 146 // Pass all URLs to the metadata reader until we have a correct filter. |
147 this.metadataUrlFilter_ = /.*/; | 147 this.metadataUrlFilter_ = /.*/; |
148 | 148 |
149 this.metadataReader_ = new Worker('js/metadata_dispatcher.js'); | 149 this.metadataReader_ = new Worker('js/metadata_dispatcher.js'); |
150 this.metadataReader_.onmessage = this.onMetadataMessage_.bind(this); | 150 this.metadataReader_.onmessage = this.onMetadataMessage_.bind(this); |
151 this.metadataReader_.postMessage({verb: 'init'}); | 151 this.metadataReader_.postMessage({verb: 'init'}); |
152 // Initialization is not complete until the Worker sends back the | 152 // Initialization is not complete until the Worker sends back the |
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3148 | 3148 |
3149 if (msg) { | 3149 if (msg) { |
3150 console.log('no no no'); | 3150 console.log('no no no'); |
3151 this.alert.show(msg, onAccept); | 3151 this.alert.show(msg, onAccept); |
3152 return false; | 3152 return false; |
3153 } | 3153 } |
3154 | 3154 |
3155 return true; | 3155 return true; |
3156 }; | 3156 }; |
3157 })(); | 3157 })(); |
OLD | NEW |