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

Unified Diff: chrome/browser/resources/md_downloads/item.js

Issue 1409473002: MD Downloads: replace <paper-icon-button> with <inky-text-button> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iron-list3
Patch Set: crisp Created 5 years, 2 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
Index: chrome/browser/resources/md_downloads/item.js
diff --git a/chrome/browser/resources/md_downloads/item.js b/chrome/browser/resources/md_downloads/item.js
index 3bce0bf934d4287bb201c33ec20d6721235660c3..308680bb925aa1d7b765394fa4d56cb78ce14e37 100644
--- a/chrome/browser/resources/md_downloads/item.js
+++ b/chrome/browser/resources/md_downloads/item.js
@@ -92,9 +92,26 @@ cr.define('downloads', function() {
],
ready: function() {
+ this.listen(this.$.remove, 'down', 'activateRipple_');
+ this.listen(this.$.remove, 'up', 'deactivateRipple_');
+
this.content = this.$.content;
},
+ /**
+ * @param {!Event} e
+ * @private
+ */
+ activateRipple_: function(e) {
+ if (!this.removeRipple_) {
+ this.removeRipple_ = document.createElement('paper-ripple');
+ this.removeRipple_.setAttribute('center', '');
esprehn 2015/10/15 04:53:20 .center = true I think is better than going throug
+ this.removeRipple_.classList.add('circle');
+ this.$.remove.appendChild(this.removeRipple_);
+ }
+ this.removeRipple_.downAction(e);
+ },
+
/** @private */
computeClass_: function() {
var classes = [];
@@ -242,6 +259,14 @@ cr.define('downloads', function() {
return '';
},
+ /**
+ * @param {!Event} e
+ * @private
+ */
+ deactivateRipple_: function(e) {
+ this.removeRipple_.upAction(e);
+ },
+
/** @private */
isIndeterminate_: function() {
return this.data.percent == -1;

Powered by Google App Engine
This is Rietveld 408576698