Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 10991014: [filemanager] Improved thumbnail update for changed files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** 5 /**
6 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 }; 1863 };
1864 1864
1865 FileManager.prototype.refreshCurrentDirectoryMetadata_ = function() { 1865 FileManager.prototype.refreshCurrentDirectoryMetadata_ = function() {
1866 var entries = this.directoryModel_.getFileList().slice(); 1866 var entries = this.directoryModel_.getFileList().slice();
1867 // We don't pass callback here. When new metadata arrives, we have an 1867 // We don't pass callback here. When new metadata arrives, we have an
1868 // observer registered to update the UI. 1868 // observer registered to update the UI.
1869 1869
1870 // TODO(dgozman): refresh content metadata only when modificationTime 1870 // TODO(dgozman): refresh content metadata only when modificationTime
1871 // changed. 1871 // changed.
1872 this.metadataCache_.clear(entries, 'filesystem|thumbnail|media'); 1872 this.metadataCache_.clear(entries, 'filesystem|thumbnail|media');
1873 this.metadataCache_.get(entries, 'filesystem|thumbnail', null); 1873 this.metadataCache_.get(entries, 'filesystem', null);
1874 if (this.isOnGData()) { 1874 if (this.isOnGData()) {
1875 this.metadataCache_.clear(entries, 'gdata'); 1875 this.metadataCache_.clear(entries, 'gdata');
1876 this.metadataCache_.get(entries, 'gdata', null); 1876 this.metadataCache_.get(entries, 'gdata', null);
1877 } 1877 }
1878
1879 var visibleItems = this.currentList_.items;
1880 var visibleEntries = [];
1881 for (var i = 0; i < visibleItems.length; i++) {
1882 var index = this.currentList_.getIndexOfListItem(visibleItems[i]);
1883 var entry = this.directoryModel_.getFileList().item(index);
1884 visibleEntries.push(entry);
1885 }
1886 this.metadataCache_.get(visibleEntries, 'thumbnail', null);
1878 }; 1887 };
1879 1888
1880 FileManager.prototype.dailyUpdateModificationTime_ = function() { 1889 FileManager.prototype.dailyUpdateModificationTime_ = function() {
1881 var fileList = this.directoryModel_.getFileList(); 1890 var fileList = this.directoryModel_.getFileList();
1882 var urls = []; 1891 var urls = [];
1883 for (var i = 0; i < fileList.length; i++) { 1892 for (var i = 0; i < fileList.length; i++) {
1884 urls.push(fileList.item(i).toURL()); 1893 urls.push(fileList.item(i).toURL());
1885 } 1894 }
1886 this.metadataCache_.get( 1895 this.metadataCache_.get(
1887 fileList.slice(), 'filesystem', 1896 fileList.slice(), 'filesystem',
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after
3686 this.openWithCommand_.canExecuteChange(); 3695 this.openWithCommand_.canExecuteChange();
3687 3696
3688 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard 3697 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard
3689 // attribute and we can't use it's setter as usual. 3698 // attribute and we can't use it's setter as usual.
3690 this.openWithCommand_.__lookupSetter__('hidden'). 3699 this.openWithCommand_.__lookupSetter__('hidden').
3691 call(this.openWithCommand_, !(defaultItem && isMultiple)); 3700 call(this.openWithCommand_, !(defaultItem && isMultiple));
3692 this.defaultActionMenuItem_.hidden = !defaultItem; 3701 this.defaultActionMenuItem_.hidden = !defaultItem;
3693 defaultActionSeparator.hidden = !defaultItem; 3702 defaultActionSeparator.hidden = !defaultItem;
3694 }; 3703 };
3695 })(); 3704 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698