Chromium Code Reviews| 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(); |