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

Unified Diff: base/message_loop/message_pump.h

Issue 395913006: High resolution timer fix for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup Created 6 years, 5 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: base/message_loop/message_pump.h
diff --git a/base/message_loop/message_pump.h b/base/message_loop/message_pump.h
index 4dc501b660839e0a56b74778abc883864396847d..74a2206bb8bd1b747d180e39de0587b51477ab93 100644
--- a/base/message_loop/message_pump.h
+++ b/base/message_loop/message_pump.h
@@ -41,6 +41,10 @@ class BASE_EXPORT MessagePump : public NonThreadSafe {
// Called from within Run just before the message pump goes to sleep.
// Returns true to indicate that idle work was done.
virtual bool DoIdleWork() = 0;
+
+ // Called when the pump is about to sleep. The delegate should update the
+ // timer granularity to the appropriate value for the pending tasks.
+ virtual void UpdateTimerGranularity() {}
darin (slow to review) 2014/07/18 04:07:59 why don't you just use DoIdleWork for this? it is
jamesr 2014/07/18 04:45:37 it's also called before not sleeping (i.e. we have
darin (slow to review) 2014/07/18 04:55:54 I don't think that's quite right. In that case, Do
jamesr 2014/07/18 06:18:33 Good points. I agree doing this at the end of DoI
};
MessagePump();

Powered by Google App Engine
This is Rietveld 408576698