| Index: base/message_pump_win.h
|
| diff --git a/base/message_pump_win.h b/base/message_pump_win.h
|
| index d0d32f6ed7083dfd592c1b87e17855de766b8170..f5a00f3015ecc4a2e61f57e07a44311eb4fdb8ec 100644
|
| --- a/base/message_pump_win.h
|
| +++ b/base/message_pump_win.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -13,6 +13,7 @@
|
| #include "base/base_export.h"
|
| #include "base/basictypes.h"
|
| #include "base/message_pump.h"
|
| +#include "base/message_pump_dispatcher.h"
|
| #include "base/message_pump_observer.h"
|
| #include "base/observer_list.h"
|
| #include "base/time.h"
|
| @@ -25,23 +26,6 @@ namespace base {
|
| // controlling the lifetime of the message pump.
|
| class BASE_EXPORT MessagePumpWin : public MessagePump {
|
| public:
|
| -
|
| - // Dispatcher is used during a nested invocation of Run to dispatch events.
|
| - // If Run is invoked with a non-NULL Dispatcher, 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 to dispatch, or not, the event.
|
| - //
|
| - // The nested loop is exited by either posting a quit, or returning false
|
| - // from Dispatch.
|
| - class BASE_EXPORT Dispatcher {
|
| - public:
|
| - virtual ~Dispatcher() {}
|
| - // Dispatches the event. If true is returned processing continues as
|
| - // normal. If false is returned, the nested loop exits immediately.
|
| - virtual bool Dispatch(const MSG& msg) = 0;
|
| - };
|
| -
|
| MessagePumpWin() : have_work_(0), state_(NULL) {}
|
| virtual ~MessagePumpWin() {}
|
|
|
| @@ -58,7 +42,7 @@ class BASE_EXPORT MessagePumpWin : public MessagePump {
|
| void DidProcessMessage(const MSG& msg);
|
|
|
| // Like MessagePump::Run, but MSG objects are routed through dispatcher.
|
| - void RunWithDispatcher(Delegate* delegate, Dispatcher* dispatcher);
|
| + void RunWithDispatcher(Delegate* delegate, MessagePumpDispatcher* dispatcher);
|
|
|
| // MessagePump methods:
|
| virtual void Run(Delegate* delegate) { RunWithDispatcher(delegate, NULL); }
|
| @@ -67,7 +51,7 @@ class BASE_EXPORT MessagePumpWin : public MessagePump {
|
| protected:
|
| struct RunState {
|
| Delegate* delegate;
|
| - Dispatcher* dispatcher;
|
| + MessagePumpDispatcher* dispatcher;
|
|
|
| // Used to flag that the current Run() invocation should return ASAP.
|
| bool should_quit;
|
|
|