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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/FilmStripView.js

Issue 2706293007: [DevTools] Fix Dialog's close button to properly close dialog. (Closed)
Patch Set: test 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
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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 PerfUI.FilmStripView = class extends UI.HBox { 7 PerfUI.FilmStripView = class extends UI.HBox {
8 constructor() { 8 constructor() {
9 super(true); 9 super(true);
10 this.registerRequiredCSS('perf_ui/filmStripView.css'); 10 this.registerRequiredCSS('perf_ui/filmStripView.css');
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 this.contentElement.addEventListener('keydown', this._keyDown.bind(this), fa lse); 235 this.contentElement.addEventListener('keydown', this._keyDown.bind(this), fa lse);
236 this.setDefaultFocusedElement(this.contentElement); 236 this.setDefaultFocusedElement(this.contentElement);
237 this._render(); 237 this._render();
238 } 238 }
239 239
240 _resize() { 240 _resize() {
241 if (!this._dialog) { 241 if (!this._dialog) {
242 this._dialog = new UI.Dialog(); 242 this._dialog = new UI.Dialog();
243 this.show(this._dialog.contentElement); 243 this.show(this._dialog.contentElement);
244 this._dialog.showDialog(); 244 this._dialog.show();
245 } 245 }
246 this._dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent); 246 this._dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);
247 } 247 }
248 248
249 /** 249 /**
250 * @param {!Event} event 250 * @param {!Event} event
251 */ 251 */
252 _keyDown(event) { 252 _keyDown(event) {
253 switch (event.key) { 253 switch (event.key) {
254 case 'ArrowLeft': 254 case 'ArrowLeft':
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 * @return {!Promise<undefined>} 301 * @return {!Promise<undefined>}
302 */ 302 */
303 _render() { 303 _render() {
304 var frame = this._frames[this._index]; 304 var frame = this._frames[this._index];
305 this._timeLabel.textContent = Number.millisToString(frame.timestamp - this._ zeroTime); 305 this._timeLabel.textContent = Number.millisToString(frame.timestamp - this._ zeroTime);
306 return frame.imageDataPromise() 306 return frame.imageDataPromise()
307 .then(PerfUI.FilmStripView._setImageData.bind(null, this._imageElement)) 307 .then(PerfUI.FilmStripView._setImageData.bind(null, this._imageElement))
308 .then(this._resize.bind(this)); 308 .then(this._resize.bind(this));
309 } 309 }
310 }; 310 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698