OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * FileManager constructor. | 8 * FileManager constructor. |
9 * | 9 * |
10 * FileManager objects encapsulate the functionality of the file selector | 10 * FileManager objects encapsulate the functionality of the file selector |
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 if (this.dialogType === DialogType.FULL_PAGE) { | 1575 if (this.dialogType === DialogType.FULL_PAGE) { |
1576 // In the FULL_PAGE mode if the restored URL points to a file we might | 1576 // In the FULL_PAGE mode if the restored URL points to a file we might |
1577 // have to invoke a task after selecting it. | 1577 // have to invoke a task after selecting it. |
1578 if (this.params_.action === 'select') | 1578 if (this.params_.action === 'select') |
1579 return; | 1579 return; |
1580 | 1580 |
1581 var task = null; | 1581 var task = null; |
1582 // Handle restoring after crash, or the gallery action. | 1582 // Handle restoring after crash, or the gallery action. |
1583 // TODO(mtomasz): Use the gallery action instead of just the gallery | 1583 // TODO(mtomasz): Use the gallery action instead of just the gallery |
1584 // field. | 1584 // field. |
1585 if (this.params_.gallery || this.params_.action === 'gallery') { | 1585 if (this.params_.gallery || |
| 1586 this.params_.action === 'gallery' || |
| 1587 this.params_.action === 'gallery-video') { |
1586 if (!opt_selectionEntry) { | 1588 if (!opt_selectionEntry) { |
1587 // Non-existent file or a directory. | 1589 // Non-existent file or a directory. |
1588 // Reloading while the Gallery is open with empty or multiple | 1590 // Reloading while the Gallery is open with empty or multiple |
1589 // selection. Open the Gallery when the directory is scanned. | 1591 // selection. Open the Gallery when the directory is scanned. |
1590 task = function() { | 1592 task = function() { |
1591 new FileTasks(this, this.params_).openGallery([]); | 1593 new FileTasks(this, this.params_).openGallery([]); |
1592 }.bind(this); | 1594 }.bind(this); |
1593 } else { | 1595 } else { |
1594 // The file or the directory exists. | 1596 // The file or the directory exists. |
1595 task = function() { | 1597 task = function() { |
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3720 callback(this.preferences_); | 3722 callback(this.preferences_); |
3721 return; | 3723 return; |
3722 } | 3724 } |
3723 | 3725 |
3724 chrome.fileBrowserPrivate.getPreferences(function(prefs) { | 3726 chrome.fileBrowserPrivate.getPreferences(function(prefs) { |
3725 this.preferences_ = prefs; | 3727 this.preferences_ = prefs; |
3726 callback(prefs); | 3728 callback(prefs); |
3727 }.bind(this)); | 3729 }.bind(this)); |
3728 }; | 3730 }; |
3729 })(); | 3731 })(); |
OLD | NEW |