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 246 matching lines...) Loading... |
257 this._dialog.show(); | 257 this._dialog.show(); |
258 } | 258 } |
259 this._dialog.contentResized(); | 259 this._dialog.contentResized(); |
260 }, | 260 }, |
261 | 261 |
262 /** | 262 /** |
263 * @param {!Event} event | 263 * @param {!Event} event |
264 */ | 264 */ |
265 _keyDown: function(event) | 265 _keyDown: function(event) |
266 { | 266 { |
267 switch (event.keyIdentifier) { | 267 switch (event.key) { |
268 case "Left": | 268 case "ArrowLeft": |
269 if (WebInspector.isMac() && event.metaKey) | 269 if (WebInspector.isMac() && event.metaKey) |
270 this._onFirstFrame(); | 270 this._onFirstFrame(); |
271 else | 271 else |
272 this._onPrevFrame(); | 272 this._onPrevFrame(); |
273 break; | 273 break; |
274 | 274 |
275 case "Right": | 275 case "ArrowRight": |
276 if (WebInspector.isMac() && event.metaKey) | 276 if (WebInspector.isMac() && event.metaKey) |
277 this._onLastFrame(); | 277 this._onLastFrame(); |
278 else | 278 else |
279 this._onNextFrame(); | 279 this._onNextFrame(); |
280 break; | 280 break; |
281 | 281 |
282 case "Home": | 282 case "Home": |
283 this._onFirstFrame(); | 283 this._onFirstFrame(); |
284 break; | 284 break; |
285 | 285 |
(...skipping 34 matching lines...) Loading... |
320 */ | 320 */ |
321 _render: function() | 321 _render: function() |
322 { | 322 { |
323 var frame = this._frames[this._index]; | 323 var frame = this._frames[this._index]; |
324 this._timeLabel.textContent = Number.millisToString(frame.timestamp - th
is._zeroTime); | 324 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)); | 325 return frame.imageDataPromise().then(WebInspector.FilmStripView._setImag
eData.bind(null, this._imageElement)).then(this._resize.bind(this)); |
326 }, | 326 }, |
327 | 327 |
328 __proto__: WebInspector.VBox.prototype | 328 __proto__: WebInspector.VBox.prototype |
329 } | 329 } |
OLD | NEW |