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

Side by Side Diff: ui/file_manager/file_manager/foreground/js/file_transfer_controller.js

Issue 529413002: Rename DriveProvider to ExternalProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 * Global (placed in the window object) variable name to hold internal 8 * Global (placed in the window object) variable name to hold internal
9 * file dragging information. Needed to show visual feedback while dragging 9 * file dragging information. Needed to show visual feedback while dragging
10 * since DataTransfer object is in protected state. Reachable from other 10 * since DataTransfer object is in protected state. Reachable from other
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 947
948 if (entries.length === 1) { 948 if (entries.length === 1) {
949 // For single selection, the dragged element is created in advance, 949 // For single selection, the dragged element is created in advance,
950 // otherwise an image may not be loaded at the time the 'dragstart' event 950 // otherwise an image may not be loaded at the time the 'dragstart' event
951 // comes. 951 // comes.
952 this.preloadThumbnailImage_(entries[0]); 952 this.preloadThumbnailImage_(entries[0]);
953 } 953 }
954 954
955 if (this.isOnDrive) { 955 if (this.isOnDrive) {
956 this.allDriveFilesAvailable = false; 956 this.allDriveFilesAvailable = false;
957 this.metadataCache_.get(entries, 'drive', function(props) { 957 this.metadataCache_.get(entries, 'external', function(props) {
958 // We consider directories not available offline for the purposes of 958 // We consider directories not available offline for the purposes of
959 // file transfer since we cannot afford to recursive traversal. 959 // file transfer since we cannot afford to recursive traversal.
960 this.allDriveFilesAvailable = 960 this.allDriveFilesAvailable =
961 !containsDirectory && 961 !containsDirectory &&
962 props.filter(function(p) { 962 props.filter(function(p) {
963 return !p.availableOffline; 963 return !p.availableOffline;
964 }).length === 0; 964 }).length === 0;
965 // |Copy| is the only menu item affected by allDriveFilesAvailable. 965 // |Copy| is the only menu item affected by allDriveFilesAvailable.
966 // It could be open right now, update its UI. 966 // It could be open right now, update its UI.
967 this.copyCommand_.disabled = !this.canCopyOrDrag_(); 967 this.copyCommand_.disabled = !this.canCopyOrDrag_();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 !event.ctrlKey) { 1060 !event.ctrlKey) {
1061 return 'move'; 1061 return 'move';
1062 } 1062 }
1063 if (event.shiftKey) { 1063 if (event.shiftKey) {
1064 return 'move'; 1064 return 'move';
1065 } 1065 }
1066 } 1066 }
1067 return 'copy'; 1067 return 'copy';
1068 }, 1068 },
1069 }; 1069 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698