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

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

Issue 10198010: [filemanager] Open Downloads by default (instead of removable device). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Description. Created 8 years, 8 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/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 /** 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 2694 matching lines...) Expand 10 before | Expand all | Expand 10 after
2705 // This device mount was the reason this File Manager instance was 2705 // This device mount was the reason this File Manager instance was
2706 // created. Now the device is unmounted from another instance 2706 // created. Now the device is unmounted from another instance
2707 // or the user removed the device manually. Close this instance. 2707 // or the user removed the device manually. Close this instance.
2708 // window.close() sometimes doesn't work. 2708 // window.close() sometimes doesn't work.
2709 chrome.tabs.getCurrent(function(tab) { 2709 chrome.tabs.getCurrent(function(tab) {
2710 chrome.tabs.remove(tab.id); 2710 chrome.tabs.remove(tab.id);
2711 }); 2711 });
2712 return; 2712 return;
2713 } 2713 }
2714 // Current directory just unmounted. Move to the 'Downloads'. 2714 // Current directory just unmounted. Move to the 'Downloads'.
2715 changeDirectoryTo = '/' + DirectoryModel.DOWNLOADS_DIRECTORY; 2715 changeDirectoryTo = this.directoryModel_.getDefaultDirectory();
2716 } 2716 }
2717 } 2717 }
2718 2718
2719 // Even if something failed root list should be rescanned. 2719 // Even if something failed root list should be rescanned.
2720 // Failed mounts can "give" us new devices which might be formatted, 2720 // Failed mounts can "give" us new devices which might be formatted,
2721 // so we have to refresh root list then. 2721 // so we have to refresh root list then.
2722 self.directoryModel_.updateRoots(function() { 2722 self.directoryModel_.updateRoots(function() {
2723 if (changeDirectoryTo) { 2723 if (changeDirectoryTo) {
2724 self.directoryModel_.changeDirectory(changeDirectoryTo); 2724 self.directoryModel_.changeDirectory(changeDirectoryTo);
2725 } 2725 }
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
4332 4332
4333 handleSplitterDragEnd: function(e) { 4333 handleSplitterDragEnd: function(e) {
4334 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments); 4334 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments);
4335 this.ownerDocument.documentElement.classList.remove('col-resize'); 4335 this.ownerDocument.documentElement.classList.remove('col-resize');
4336 } 4336 }
4337 }; 4337 };
4338 4338
4339 customSplitter.decorate(splitterElement); 4339 customSplitter.decorate(splitterElement);
4340 }; 4340 };
4341 })(); 4341 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/directory_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698