summaryrefslogtreecommitdiffstats
path: root/base/message_pump.h
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 19:25:04 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 19:25:04 +0000
commit4554c236675f1d938a358738f300021487b8c34e (patch)
tree6139f3ba54d6a0fe2a1ed7d69a93c6cb3e9cd39b /base/message_pump.h
parent637d3443eccf1633e28ec473e8e2f36611d7b148 (diff)
downloadchromium_src-4554c236675f1d938a358738f300021487b8c34e.zip
chromium_src-4554c236675f1d938a358738f300021487b8c34e.tar.gz
chromium_src-4554c236675f1d938a358738f300021487b8c34e.tar.bz2
MessagePump implementations should call DoWork and DoDelayedWork at equal
priority. BUG=72007 TEST=base_unittests --gtest_filter=MessageLoopTest.RecursiveDenial3 Review URL: http://codereview.chromium.org/6507017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump.h')
-rw-r--r--base/message_pump.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/base/message_pump.h b/base/message_pump.h
index a354724..866b33a 100644
--- a/base/message_pump.h
+++ b/base/message_pump.h
@@ -22,7 +22,8 @@ class MessagePump : public RefCountedThreadSafe<MessagePump> {
// 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 @@ class MessagePump : public RefCountedThreadSafe<MessagePump> {
// 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 @@ class MessagePump : public RefCountedThreadSafe<MessagePump> {
// 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