| 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 { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 }, | 57 }, |
| 58 | 58 |
| 59 /** | 59 /** |
| 60 * @param {!WebInspector.FilmStripModel.Frame} frame | 60 * @param {!WebInspector.FilmStripModel.Frame} frame |
| 61 * @return {!Promise<!Element>} | 61 * @return {!Promise<!Element>} |
| 62 */ | 62 */ |
| 63 createFrameElement: function(frame) | 63 createFrameElement: function(frame) |
| 64 { | 64 { |
| 65 var time = frame.timestamp; | 65 var time = frame.timestamp; |
| 66 var element = createElementWithClass("div", "frame"); | 66 var element = createElementWithClass("div", "frame"); |
| 67 WebInspector.Tooltip.install(element, WebInspector.UIString("Doubleclick
to zoom image. Click to view preceding requests.")); | 67 element.title = WebInspector.UIString("Doubleclick to zoom image. Click
to view preceding requests."); |
| 68 element.createChild("div", "time").textContent = Number.millisToString(t
ime - this._zeroTime); | 68 element.createChild("div", "time").textContent = Number.millisToString(t
ime - this._zeroTime); |
| 69 var imageElement = element.createChild("div", "thumbnail").createChild("
img"); | 69 var imageElement = element.createChild("div", "thumbnail").createChild("
img"); |
| 70 element.addEventListener("mousedown", this._onMouseEvent.bind(this, WebI
nspector.FilmStripView.Events.FrameSelected, time), false); | 70 element.addEventListener("mousedown", this._onMouseEvent.bind(this, WebI
nspector.FilmStripView.Events.FrameSelected, time), false); |
| 71 element.addEventListener("mouseenter", this._onMouseEvent.bind(this, Web
Inspector.FilmStripView.Events.FrameEnter, time), false); | 71 element.addEventListener("mouseenter", this._onMouseEvent.bind(this, Web
Inspector.FilmStripView.Events.FrameEnter, time), false); |
| 72 element.addEventListener("mouseout", this._onMouseEvent.bind(this, WebIn
spector.FilmStripView.Events.FrameExit, time), false); | 72 element.addEventListener("mouseout", this._onMouseEvent.bind(this, WebIn
spector.FilmStripView.Events.FrameExit, time), false); |
| 73 element.addEventListener("dblclick", this._onDoubleClick.bind(this, fram
e), false); | 73 element.addEventListener("dblclick", this._onDoubleClick.bind(this, fram
e), false); |
| 74 | 74 |
| 75 return frame.imageDataPromise().then(WebInspector.FilmStripView._setImag
eData.bind(null, imageElement)).then(returnElement); | 75 return frame.imageDataPromise().then(WebInspector.FilmStripView._setImag
eData.bind(null, imageElement)).then(returnElement); |
| 76 /** | 76 /** |
| 77 * @return {!Element} | 77 * @return {!Element} |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 */ | 317 */ |
| 318 _render: function() | 318 _render: function() |
| 319 { | 319 { |
| 320 var frame = this._frames[this._index]; | 320 var frame = this._frames[this._index]; |
| 321 this._timeLabel.textContent = Number.millisToString(frame.timestamp - th
is._zeroTime); | 321 this._timeLabel.textContent = Number.millisToString(frame.timestamp - th
is._zeroTime); |
| 322 return frame.imageDataPromise().then(WebInspector.FilmStripView._setImag
eData.bind(null, this._imageElement)); | 322 return frame.imageDataPromise().then(WebInspector.FilmStripView._setImag
eData.bind(null, this._imageElement)); |
| 323 }, | 323 }, |
| 324 | 324 |
| 325 __proto__: WebInspector.DialogDelegate.prototype | 325 __proto__: WebInspector.DialogDelegate.prototype |
| 326 } | 326 } |
| OLD | NEW |