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 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 this.onOk_(); | 2400 this.onOk_(); |
2401 | 2401 |
2402 }; | 2402 }; |
2403 | 2403 |
2404 /** | 2404 /** |
2405 * Update the UI when the current directory changes. | 2405 * Update the UI when the current directory changes. |
2406 * | 2406 * |
2407 * @param {cr.Event} event The directory-changed event. | 2407 * @param {cr.Event} event The directory-changed event. |
2408 */ | 2408 */ |
2409 FileManager.prototype.onDirectoryChanged_ = function(event) { | 2409 FileManager.prototype.onDirectoryChanged_ = function(event) { |
2410 if (this.currentDirEntry_.fullPath.substr(0, DOWNLOADS_DIRECTORY.length) == | 2410 if (this.dialogType_ == FileManager.DialogType.FULL_PAGE && |
| 2411 this.currentDirEntry_.fullPath.substr(0, DOWNLOADS_DIRECTORY.length) == |
2411 DOWNLOADS_DIRECTORY) { | 2412 DOWNLOADS_DIRECTORY) { |
2412 if (this.downloadsWarning_.style.height != DOWNLOADS_WARNING_HEIGHT) { | 2413 if (this.downloadsWarning_.style.height != DOWNLOADS_WARNING_HEIGHT) { |
2413 // Current path starts with DOWNLOADS_DIRECTORY, show the warning. | 2414 // Current path starts with DOWNLOADS_DIRECTORY, show the warning. |
2414 this.downloadsWarning_.style.height = DOWNLOADS_WARNING_HEIGHT; | 2415 this.downloadsWarning_.style.height = DOWNLOADS_WARNING_HEIGHT; |
2415 this.requestResize_(100); | 2416 this.requestResize_(100); |
2416 } | 2417 } |
2417 } else { | 2418 } else { |
2418 if (this.downloadsWarning_.style.height != '0') { | 2419 if (this.downloadsWarning_.style.height != '0') { |
2419 this.downloadsWarning_.style.height = '0'; | 2420 this.downloadsWarning_.style.height = '0'; |
2420 this.requestResize_(100); | 2421 this.requestResize_(100); |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3080 | 3081 |
3081 if (msg) { | 3082 if (msg) { |
3082 console.log('no no no'); | 3083 console.log('no no no'); |
3083 this.alert.show(msg, onAccept); | 3084 this.alert.show(msg, onAccept); |
3084 return false; | 3085 return false; |
3085 } | 3086 } |
3086 | 3087 |
3087 return true; | 3088 return true; |
3088 }; | 3089 }; |
3089 })(); | 3090 })(); |
OLD | NEW |