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

Side by Side Diff: ui/file_manager/file_manager/foreground/elements/files_toast.js

Issue 2602693002: Files app: Compile custom elements. (Closed)
Patch Set: Sort dependencies. Created 3 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * Files Toast. 6 * Files Toast.
7 * 7 *
8 * This toast is shown at the bottom-right in ltr (bottom-left in rtl). 8 * This toast is shown at the bottom-right in ltr (bottom-left in rtl).
9 * 9 *
10 * Usage: 10 * Usage:
(...skipping 24 matching lines...) Expand all
35 * @private {?{text: string, callback: function()}} 35 * @private {?{text: string, callback: function()}}
36 */ 36 */
37 this.action_ = null; 37 this.action_ = null;
38 38
39 /** 39 /**
40 * @private {number} 40 * @private {number}
41 */ 41 */
42 this.generationId_ = 0; 42 this.generationId_ = 0;
43 43
44 /** 44 /**
45 * @private {AnimationPlayer} 45 * @private {Animation}
46 */ 46 */
47 this.enterAnimationPlayer_ = null; 47 this.enterAnimationPlayer_ = null;
48 48
49 /** 49 /**
50 * @private {AnimationPlayer} 50 * @private {Animation}
51 */ 51 */
52 this.hideAnimationPlayer_ = null; 52 this.hideAnimationPlayer_ = null;
53 }, 53 },
54 54
55 /** 55 /**
56 * Shows toast. If a toast is already shown, hide the current toast first and 56 * Shows toast. If a toast is already shown, hide the current toast first and
57 * show next toast after the previous one disappears. 57 * show next toast after the previous one disappears.
58 * 58 *
59 * @param {string} text Text of toast. 59 * @param {string} text Text of toast.
60 * @param {{text: string, callback:function()}=} opt_action Action. Callback 60 * @param {{text: string, callback:function()}=} opt_action Action. Callback
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 return new Promise(function(resolve) { 161 return new Promise(function(resolve) {
162 this.hideAnimationPlayer_.addEventListener('finish', resolve); 162 this.hideAnimationPlayer_.addEventListener('finish', resolve);
163 }.bind(this)).then(function() { 163 }.bind(this)).then(function() {
164 this.$.container.hidden = true; 164 this.$.container.hidden = true;
165 this.hideAnimationPlayer_ = null; 165 this.hideAnimationPlayer_ = null;
166 this._setVisible(false); 166 this._setVisible(false);
167 }.bind(this)); 167 }.bind(this));
168 } 168 }
169 }); 169 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698