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

Unified Diff: base/message_pump.h

Issue 6507017: MessagePump implementations should call DoWork and DoDelayedWork at equal priority (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
« no previous file with comments | « base/message_loop_unittest.cc ('k') | base/message_pump_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump.h
===================================================================
--- base/message_pump.h (revision 75181)
+++ base/message_pump.h (working copy)
@@ -22,7 +22,8 @@
// Called from within Run in response to ScheduleWork or when the message
// pump would otherwise call DoDelayedWork. Returns true to indicate that
- // work was done. DoDelayedWork will not be called if DoWork returns true.
+ // work was done. DoDelayedWork will still be called if DoWork returns
+ // true, but DoIdleWork will not.
virtual bool DoWork() = 0;
// Called from within Run in response to ScheduleDelayedWork or when the
@@ -61,7 +62,8 @@
// if (should_quit_)
// break;
//
- // did_work |= delegate_->DoDelayedWork();
+ // TimeTicks next_time;
+ // did_work |= delegate_->DoDelayedWork(&next_time);
// if (should_quit_)
// break;
//
@@ -84,9 +86,9 @@
// blocks until there is more work of any type to do.
//
// Notice that the run loop cycles between calling DoInternalWork, DoWork,
- // and DoDelayedWork methods. This helps ensure that neither work queue
- // starves the other. This is important for message pumps that are used to
- // drive animations, for example.
+ // and DoDelayedWork methods. This helps ensure that none of these work
+ // queues starve the others. This is important for message pumps that are
+ // used to drive animations, for example.
//
// Notice also that after each callout to foreign code, the run loop checks
// to see if it should quit. The Quit method is responsible for setting this
« no previous file with comments | « base/message_loop_unittest.cc ('k') | base/message_pump_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698