| Index: base/message_pump_dispatcher.h
|
| diff --git a/base/message_pump_dispatcher.h b/base/message_pump_dispatcher.h
|
| index 685e92be7d8ee7c8708341363a2ef5c0736181fd..d9860c05e393a01890e401af85c49ce6491a946f 100644
|
| --- a/base/message_pump_dispatcher.h
|
| +++ b/base/message_pump_dispatcher.h
|
| @@ -15,11 +15,12 @@ namespace base {
|
| // events when |MessageLoop::RunWithDispatcher| is invoked. If
|
| // |MessageLoop::Run| is invoked, MessageLoop does not dispatch events
|
| // (or invoke TranslateMessage), rather every message is passed to
|
| -// Dispatcher's Dispatch method for dispatch. It is up to the
|
| -// Dispatcher whether or not to dispatch the event.
|
| +// Dispatcher's Dispatch() method for dispatch. It is up to the
|
| +// Dispatcher whether or not to dispatch the event. Additionally, before
|
| +// any Tasks are processed ShouldExit() is invoked.
|
| //
|
| -// The nested loop is exited by either posting a quit, or returning false
|
| -// from Dispatch.
|
| +// The nested loop is exited by either posting a quit, or returning false from
|
| +// Dispatch() or ShouldExit().
|
| class BASE_EXPORT MessagePumpDispatcher {
|
| public:
|
| virtual ~MessagePumpDispatcher() {}
|
| @@ -27,6 +28,10 @@ class BASE_EXPORT MessagePumpDispatcher {
|
| // Dispatches the event. If true is returned processing continues as
|
| // normal. If false is returned, the nested loop exits immediately.
|
| virtual bool Dispatch(const NativeEvent& event) = 0;
|
| +
|
| + // Returns true if the loop should exit before processing a task.
|
| + // NOTE: this is currently only wired up on Linux.
|
| + virtual bool ShouldExit() = 0;
|
| };
|
|
|
| } // namespace base
|
|
|