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

Unified Diff: base/message_pump_win.h

Issue 8021009: Consolidate message observer API for win and aura (and touch). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 3 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
Index: base/message_pump_win.h
diff --git a/base/message_pump_win.h b/base/message_pump_win.h
index 5f17610172a13cf2b547aa56799c862860c93959..d0d32f6ed7083dfd592c1b87e17855de766b8170 100644
--- a/base/message_pump_win.h
+++ b/base/message_pump_win.h
@@ -13,6 +13,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/message_pump.h"
+#include "base/message_pump_observer.h"
#include "base/observer_list.h"
#include "base/time.h"
#include "base/win/scoped_handle.h"
@@ -24,23 +25,6 @@ namespace base {
// controlling the lifetime of the message pump.
class BASE_EXPORT MessagePumpWin : public MessagePump {
public:
- // An Observer is an object that receives global notifications from the
- // UI MessageLoop.
- //
- // NOTE: An Observer implementation should be extremely fast!
- //
- class BASE_EXPORT Observer {
- public:
- virtual ~Observer() {}
-
- // This method is called before processing a message.
- // The message may be undefined in which case msg.message is 0
- virtual void WillProcessMessage(const MSG& msg) = 0;
-
- // This method is called when control returns from processing a UI message.
- // The message may be undefined in which case msg.message is 0
- virtual void DidProcessMessage(const MSG& msg) = 0;
- };
// Dispatcher is used during a nested invocation of Run to dispatch events.
// If Run is invoked with a non-NULL Dispatcher, MessageLoop does not
@@ -62,11 +46,11 @@ class BASE_EXPORT MessagePumpWin : public MessagePump {
virtual ~MessagePumpWin() {}
// Add an Observer, which will start receiving notifications immediately.
- void AddObserver(Observer* observer);
+ void AddObserver(MessagePumpObserver* observer);
// Remove an Observer. It is safe to call this method while an Observer is
// receiving a notification callback.
- void RemoveObserver(Observer* observer);
+ void RemoveObserver(MessagePumpObserver* observer);
// Give a chance to code processing additional messages to notify the
// message loop observers that another message has been processed.
@@ -95,7 +79,7 @@ class BASE_EXPORT MessagePumpWin : public MessagePump {
virtual void DoRunLoop() = 0;
int GetCurrentDelay() const;
- ObserverList<Observer> observers_;
+ ObserverList<MessagePumpObserver> observers_;
// The time at which delayed work should run.
TimeTicks delayed_work_time_;

Powered by Google App Engine
This is Rietveld 408576698