OLD | NEW |
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 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.HBox} | 7 * @extends {WebInspector.HBox} |
8 */ | 8 */ |
9 WebInspector.FilmStripView = function() | 9 WebInspector.FilmStripView = function() |
10 { | 10 { |
11 WebInspector.HBox.call(this, true); | 11 WebInspector.HBox.call(this, true); |
12 this.registerRequiredCSS("components_lazy/filmStripView.css"); | 12 this.registerRequiredCSS("components_lazy/filmStripView.css"); |
13 this.contentElement.classList.add("film-strip-view"); | 13 this.contentElement.classList.add("film-strip-view"); |
14 this._statusLabel = this.contentElement.createChild("div", "label"); | 14 this._statusLabel = this.contentElement.createChild("div", "label"); |
15 this.reset(); | 15 this.reset(); |
16 this.setMode(WebInspector.FilmStripView.Modes.TimeBased); | 16 this.setMode(WebInspector.FilmStripView.Modes.TimeBased); |
17 } | 17 } |
18 | 18 |
| 19 /** @enum {symbol} */ |
19 WebInspector.FilmStripView.Events = { | 20 WebInspector.FilmStripView.Events = { |
20 FrameSelected: "FrameSelected", | 21 FrameSelected: Symbol("FrameSelected"), |
21 FrameEnter: "FrameEnter", | 22 FrameEnter: Symbol("FrameEnter"), |
22 FrameExit: "FrameExit", | 23 FrameExit: Symbol("FrameExit"), |
23 } | 24 } |
24 | 25 |
25 WebInspector.FilmStripView.Modes = { | 26 WebInspector.FilmStripView.Modes = { |
26 TimeBased: "TimeBased", | 27 TimeBased: "TimeBased", |
27 FrameBased: "FrameBased" | 28 FrameBased: "FrameBased" |
28 } | 29 } |
29 | 30 |
30 WebInspector.FilmStripView.prototype = { | 31 WebInspector.FilmStripView.prototype = { |
31 /** | 32 /** |
32 * @param {string} mode | 33 * @param {string} mode |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 */ | 321 */ |
321 _render: function() | 322 _render: function() |
322 { | 323 { |
323 var frame = this._frames[this._index]; | 324 var frame = this._frames[this._index]; |
324 this._timeLabel.textContent = Number.millisToString(frame.timestamp - th
is._zeroTime); | 325 this._timeLabel.textContent = Number.millisToString(frame.timestamp - th
is._zeroTime); |
325 return frame.imageDataPromise().then(WebInspector.FilmStripView._setImag
eData.bind(null, this._imageElement)).then(this._resize.bind(this)); | 326 return frame.imageDataPromise().then(WebInspector.FilmStripView._setImag
eData.bind(null, this._imageElement)).then(this._resize.bind(this)); |
326 }, | 327 }, |
327 | 328 |
328 __proto__: WebInspector.VBox.prototype | 329 __proto__: WebInspector.VBox.prototype |
329 } | 330 } |
OLD | NEW |