summaryrefslogtreecommitdiffstats
path: root/base/message_loop.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 01:20:36 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-17 01:20:36 +0000
commit8c6517e5e15b7e9a3d3c95f697f674d221968acc (patch)
tree315dfbae873b9b79e2aa62bc1b51de1c307189b7 /base/message_loop.h
parent83fc28d5f4523f516154f63c08a084d26d9aab6e (diff)
downloadchromium_src-8c6517e5e15b7e9a3d3c95f697f674d221968acc.zip
chromium_src-8c6517e5e15b7e9a3d3c95f697f674d221968acc.tar.gz
chromium_src-8c6517e5e15b7e9a3d3c95f697f674d221968acc.tar.bz2
base::Bind: Cleanup in automation.
BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8212006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r--base/message_loop.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/base/message_loop.h b/base/message_loop.h
index 29c736c..adb58e3 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -242,11 +242,10 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
// messages. This method may only be called on the same thread that called
// Run, and Run must still be on the call stack.
//
- // Use QuitTask if you need to Quit another thread's MessageLoop, but note
- // that doing so is fairly dangerous if the target thread makes nested calls
- // to MessageLoop::Run. The problem being that you won't know which nested
- // run loop you are quiting, so be careful!
- //
+ // Use QuitTask or QuitClosure if you need to Quit another thread's
+ // MessageLoop, but note that doing so is fairly dangerous if the target
+ // thread makes nested calls to MessageLoop::Run. The problem being that you
+ // won't know which nested run loop you are quitting, so be careful!
void Quit();
// This method is a variant of Quit, that does not wait for pending messages
@@ -255,6 +254,7 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
// Invokes Quit on the current MessageLoop when run. Useful to schedule an
// arbitrary MessageLoop to Quit.
+ // TODO(jhawkins): Remove once task.h is removed.
class QuitTask : public Task {
public:
virtual void Run() {
@@ -262,6 +262,10 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
}
};
+ // Invokes Quit on the current MessageLoop when run. Useful to schedule an
+ // arbitrary MessageLoop to Quit.
+ static base::Closure QuitClosure();
+
// Returns the type passed to the constructor.
Type type() const { return type_; }