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

Side by Side Diff: chrome/browser/resources/bluetooth_internals/snackbar.js

Issue 2535493002: Reduce webkit CSS prefixes in ui/ styles (Closed)
Patch Set: bluetooth_internals/snackbar.js Created 3 years, 10 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
« no previous file with comments | « no previous file | ui/accessibility/extensions/alt/hide-images.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 * Javascript for Snackbar controls, served from chrome://bluetooth-internals/. 6 * Javascript for Snackbar controls, served from chrome://bluetooth-internals/.
7 */ 7 */
8 8
9 cr.define('snackbar', function() { 9 cr.define('snackbar', function() {
10 /** @typedef {{ 10 /** @typedef {{
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 * snackbar is already hidden, a resolved Promise is returned. 96 * snackbar is already hidden, a resolved Promise is returned.
97 * @return {!Promise} 97 * @return {!Promise}
98 */ 98 */
99 dismiss: function() { 99 dismiss: function() {
100 this.stopTimeout_(); 100 this.stopTimeout_();
101 101
102 if (!this.classList.contains('open')) 102 if (!this.classList.contains('open'))
103 return Promise.resolve(); 103 return Promise.resolve();
104 104
105 return new Promise(function(resolve) { 105 return new Promise(function(resolve) {
106 listenOnce(this, 'webkitTransitionEnd', function() { 106 listenOnce(this, 'transitionend', function() {
107 this.dispatchEvent(new CustomEvent('dismissed')); 107 this.dispatchEvent(new CustomEvent('dismissed'));
108 resolve(); 108 resolve();
109 }.bind(this)); 109 }.bind(this));
110 110
111 ensureTransitionEndEvent(this, TRANSITION_DURATION); 111 ensureTransitionEndEvent(this, TRANSITION_DURATION);
112 this.classList.remove('open'); 112 this.classList.remove('open');
113 113
114 document.removeEventListener('contentfocus', this.boundStartTimeout_); 114 document.removeEventListener('contentfocus', this.boundStartTimeout_);
115 document.removeEventListener('contentblur', this.boundStopTimeout_); 115 document.removeEventListener('contentblur', this.boundStopTimeout_);
116 }.bind(this)); 116 }.bind(this));
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 return Promise.resolve(); 229 return Promise.resolve();
230 }; 230 };
231 231
232 232
233 233
234 return { 234 return {
235 Snackbar: Snackbar, 235 Snackbar: Snackbar,
236 SnackbarType: SnackbarType, 236 SnackbarType: SnackbarType,
237 }; 237 };
238 }); 238 });
OLDNEW
« no previous file with comments | « no previous file | ui/accessibility/extensions/alt/hide-images.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698