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

Unified Diff: ui/file_manager/file_manager/common/js/util.js

Issue 290653002: Files.app: Add 'link' to the allowed effects in dataTransfer objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/file_transfer_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/common/js/util.js
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js
index 144e89e2ec8372dfc1b2deb3391f2aeb74b716da..e85d258ad89ce62525d4455ade44f0222bd577e9 100644
--- a/ui/file_manager/file_manager/common/js/util.js
+++ b/ui/file_manager/file_manager/common/js/util.js
@@ -1370,3 +1370,16 @@ util.getEntryLabel = function(volumeManager, entry) {
return entry.name;
};
+
+/**
+ * Checks if the specified set of allowed effects contains the given effect.
+ * See: http://www.w3.org/TR/html5/editing.html#the-datatransfer-interface
+ *
+ * @param {string} effectAllowed The string denoting the set of allowed effects.
+ * @param {string} dropEffect The effect to be checked.
+ * @return {boolean} True if |dropEffect| is included in |effectAllowed|.
+ */
+util.isDropEffectAllowed = function(effectAllowed, dropEffect) {
+ return effectAllowed === 'all' ||
+ effectAllowed.toLowerCase().indexOf(dropEffect) !== -1;
+};
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/file_transfer_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698