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

Unified Diff: Source/devtools/front_end/ui/ThrottledWidget.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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ui/ThrottledWidget.js
diff --git a/Source/devtools/front_end/ui/ThrottledWidget.js b/Source/devtools/front_end/ui/ThrottledWidget.js
index fe8fa2b3c4a3224eeac4460b427db31d554d3f52..5f49e8cc4f27d6ad6a227d56b320be7a5c1c0e24 100644
--- a/Source/devtools/front_end/ui/ThrottledWidget.js
+++ b/Source/devtools/front_end/ui/ThrottledWidget.js
@@ -15,12 +15,12 @@ WebInspector.ThrottledWidget = function()
WebInspector.ThrottledWidget.prototype = {
/**
- * @param {!WebInspector.Throttler.FinishCallback} finishedCallback
* @protected
+ * @return {!Promise.<?>}
*/
- doUpdate: function(finishedCallback)
+ doUpdate: function()
{
- finishedCallback();
+ return Promise.resolve();
},
update: function()
@@ -31,16 +31,16 @@ WebInspector.ThrottledWidget.prototype = {
this._updateThrottler.schedule(innerUpdate.bind(this));
/**
- * @param {!WebInspector.Throttler.FinishCallback} finishedCallback
* @this {WebInspector.ThrottledWidget}
+ * @return {!Promise.<?>}
*/
- function innerUpdate(finishedCallback)
+ function innerUpdate()
{
if (this.isShowing()) {
- this.doUpdate(finishedCallback);
+ return this.doUpdate();
} else {
this._updateWhenVisible = true;
- finishedCallback();
+ return Promise.resolve();
}
}
},
« no previous file with comments | « Source/devtools/front_end/profiler/HeapSnapshotView.js ('k') | Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698