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

Side by Side Diff: Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js

Issue 1285183006: DevTools: WI.Throttler goes promisified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cc
Patch Set: remove dependent patchset Created 5 years, 4 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
« no previous file with comments | « Source/devtools/front_end/ui/ThrottledWidget.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/ThrottledWidget.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698