Commit 6fb53216 authored by François Degros's avatar François Degros Committed by Commit Bot

[Files app] ES6 class for drop_effect_and_label.js

Bug: 778674
Change-Id: I9e78661b34f5726855a933db61c6434adc2df2f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614726
Commit-Queue: François Degros <fdegros@chromium.org>
Auto-Submit: François Degros <fdegros@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660642}
parent 5ffea94c
......@@ -15,36 +15,34 @@ const DropEffectType = {
/**
* Represents a drop effect and a label to describe it.
*
* @param {!DropEffectType} dropEffect
* @param {?string} label
* @constructor
* @struct
*/
function DropEffectAndLabel(dropEffect, label) {
class DropEffectAndLabel {
/**
* @private {string}
* @param {!DropEffectType} dropEffect
* @param {?string} label
*/
constructor(dropEffect, label) {
/** @private @const {!DropEffectType} */
this.dropEffect_ = dropEffect;
/**
* Optional description why the drop opeartion is (not) permitted.
*
* @private {?string}
* Optional description why the drop operation is (not) permitted.
* @private @const {?string}
*/
this.label_ = label;
}
}
/**
* @return {string} Returns the type of the drop effect.
/**
* @return {!DropEffectType} Returns the type of the drop effect.
*/
DropEffectAndLabel.prototype.getDropEffect = function() {
getDropEffect() {
return this.dropEffect_;
};
}
/**
/**
* @return {?string} Returns the label. |none| if a label should not appear.
*/
DropEffectAndLabel.prototype.getLabel = function() {
getLabel() {
return this.label_;
};
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment