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

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

Issue 151413002: Files.app: Clean DirectoryModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a test. Created 6 years, 10 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 | « chrome/browser/resources/file_manager/foreground/js/directory_model.js ('k') | 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 '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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 this.grid_.addEventListener('dragselectionend', dragEndBound); 966 this.grid_.addEventListener('dragselectionend', dragEndBound);
967 967
968 // TODO(mtomasz, yoshiki): Create navigation list earlier, and here just 968 // TODO(mtomasz, yoshiki): Create navigation list earlier, and here just
969 // attach the directory model. 969 // attach the directory model.
970 this.initNavigationList_(); 970 this.initNavigationList_();
971 971
972 this.table_.addEventListener('column-resize-end', 972 this.table_.addEventListener('column-resize-end',
973 this.updateStartupPrefs_.bind(this)); 973 this.updateStartupPrefs_.bind(this));
974 974
975 // Restore preferences. 975 // Restore preferences.
976 this.directoryModel_.sortFileList( 976 this.directoryModel_.getFileList().sort(
977 this.viewOptions_.sortField || 'modificationTime', 977 this.viewOptions_.sortField || 'modificationTime',
978 this.viewOptions_.sortDirection || 'desc'); 978 this.viewOptions_.sortDirection || 'desc');
979 if (this.viewOptions_.columns) { 979 if (this.viewOptions_.columns) {
980 var cm = this.table_.columnModel; 980 var cm = this.table_.columnModel;
981 for (var i = 0; i < cm.totalSize; i++) { 981 for (var i = 0; i < cm.totalSize; i++) {
982 if (this.viewOptions_.columns[i] > 0) 982 if (this.viewOptions_.columns[i] > 0)
983 cm.setWidth(i, this.viewOptions_.columns[i]); 983 cm.setWidth(i, this.viewOptions_.columns[i]);
984 } 984 }
985 } 985 }
986 this.setListType(this.viewOptions_.listType || FileManager.ListType.DETAIL); 986 this.setListType(this.viewOptions_.listType || FileManager.ListType.DETAIL);
(...skipping 2706 matching lines...) Expand 10 before | Expand all | Expand 10 after
3693 callback(this.preferences_); 3693 callback(this.preferences_);
3694 return; 3694 return;
3695 } 3695 }
3696 3696
3697 chrome.fileBrowserPrivate.getPreferences(function(prefs) { 3697 chrome.fileBrowserPrivate.getPreferences(function(prefs) {
3698 this.preferences_ = prefs; 3698 this.preferences_ = prefs;
3699 callback(prefs); 3699 callback(prefs);
3700 }.bind(this)); 3700 }.bind(this));
3701 }; 3701 };
3702 })(); 3702 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/foreground/js/directory_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698