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

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

Issue 10342010: Add gdata content search to file_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style nits Created 8 years, 7 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
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 var MAX_DRAG_THUMBAIL_COUNT = 4; 5 var MAX_DRAG_THUMBAIL_COUNT = 4;
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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // queryCommandEnabled returns true if event.returnValue is false. 391 // queryCommandEnabled returns true if event.returnValue is false.
392 event.returnValue = !this.canPasteOrDrop_(event.clipboardData); 392 event.returnValue = !this.canPasteOrDrop_(event.clipboardData);
393 }, 393 },
394 394
395 canPasteOrDrop_: function(dataTransfer, opt_destinationPath) { 395 canPasteOrDrop_: function(dataTransfer, opt_destinationPath) {
396 var destinationPath = opt_destinationPath || 396 var destinationPath = opt_destinationPath ||
397 this.directoryModel_.getCurrentDirPath(); 397 this.directoryModel_.getCurrentDirPath();
398 if (this.directoryModel_.isPathReadOnly(destinationPath)) { 398 if (this.directoryModel_.isPathReadOnly(destinationPath)) {
399 return false; 399 return false;
400 } 400 }
401 if (util.isSpecialReadonlyDirectory(destinationPath))
402 return false;
401 403
402 if (!dataTransfer.types || dataTransfer.types.indexOf('fs/tag') == -1) 404 if (!dataTransfer.types || dataTransfer.types.indexOf('fs/tag') == -1)
403 return false; // Unsupported type of content. 405 return false; // Unsupported type of content.
404 if (dataTransfer.getData('fs/tag') == '') { 406 if (dataTransfer.getData('fs/tag') == '') {
405 // Data protected. Other checks are not possible but it makes sense to 407 // Data protected. Other checks are not possible but it makes sense to
406 // let the user try. 408 // let the user try.
407 return true; 409 return true;
408 } 410 }
409 411
410 var directories = dataTransfer.getData('fs/directories').split('\n'). 412 var directories = dataTransfer.getData('fs/directories').split('\n').
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 return 'move'; 521 return 'move';
520 } 522 }
521 if (event.dataTransfer.effectAllowed == 'copyMove' && 523 if (event.dataTransfer.effectAllowed == 'copyMove' &&
522 event.shiftKey) { 524 event.shiftKey) {
523 return 'move'; 525 return 'move';
524 } 526 }
525 return 'copy'; 527 return 'copy';
526 } 528 }
527 }; 529 };
528 530
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698