OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 this._overviewCalculator.setBounds(minimumBoundary, maximumBoundary); | 207 this._overviewCalculator.setBounds(minimumBoundary, maximumBoundary); |
208 this._overviewGrid.setResizeEnabled(true); | 208 this._overviewGrid.setResizeEnabled(true); |
209 this._cursorEnabled = true; | 209 this._cursorEnabled = true; |
210 }, | 210 }, |
211 | 211 |
212 scheduleUpdate: function() | 212 scheduleUpdate: function() |
213 { | 213 { |
214 this._updateThrottler.schedule(process.bind(this)); | 214 this._updateThrottler.schedule(process.bind(this)); |
215 /** | 215 /** |
216 * @this {WebInspector.TimelineOverviewPane} | 216 * @this {WebInspector.TimelineOverviewPane} |
217 * @param {!WebInspector.Throttler.FinishCallback} callback | 217 * @return {!Promise.<undefined>} |
218 */ | 218 */ |
219 function process(callback) | 219 function process() |
220 { | 220 { |
221 this._update(); | 221 this._update(); |
222 callback(); | 222 return Promise.resolve(); |
223 } | 223 } |
224 }, | 224 }, |
225 | 225 |
226 _update: function() | 226 _update: function() |
227 { | 227 { |
228 if (!this.isShowing()) | 228 if (!this.isShowing()) |
229 return; | 229 return; |
230 this._overviewCalculator.setDisplayWindow(this._overviewGrid.clientWidth
()); | 230 this._overviewCalculator.setDisplayWindow(this._overviewGrid.clientWidth
()); |
231 for (var i = 0; i < this._overviewControls.length; ++i) | 231 for (var i = 0; i < this._overviewControls.length; ++i) |
232 this._overviewControls[i].update(); | 232 this._overviewControls[i].update(); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 }, | 622 }, |
623 | 623 |
624 resetCanvas: function() | 624 resetCanvas: function() |
625 { | 625 { |
626 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; | 626 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; |
627 this._canvas.height = this.element.clientHeight * window.devicePixelRati
o; | 627 this._canvas.height = this.element.clientHeight * window.devicePixelRati
o; |
628 }, | 628 }, |
629 | 629 |
630 __proto__: WebInspector.VBox.prototype | 630 __proto__: WebInspector.VBox.prototype |
631 } | 631 } |
OLD | NEW |