Index: base/message_pump_win.h |
diff --git a/base/message_pump_win.h b/base/message_pump_win.h |
index fd461988ed9527569ff66849983306c8c868e790..51ba5ae5b0f13500b56f227ebb1abb539c68955b 100644 |
--- a/base/message_pump_win.h |
+++ b/base/message_pump_win.h |
@@ -11,6 +11,7 @@ |
#include "base/base_export.h" |
#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/message_pump.h" |
#include "base/message_pump_dispatcher.h" |
#include "base/message_pump_observer.h" |
@@ -19,6 +20,9 @@ |
#include "base/win/scoped_handle.h" |
namespace base { |
+namespace win { |
+class TextServicesBridge; |
rvargas (doing something else)
2012/08/21 19:45:37
remove this.
yoichio
2012/08/22 08:06:50
Done.
|
+} // namespace win |
// MessagePumpWin serves as the base for specialized versions of the MessagePump |
// for Windows. It provides basic functionality like handling of observers and |
@@ -126,6 +130,22 @@ class BASE_EXPORT MessagePumpWin : public MessagePump { |
// |
class BASE_EXPORT MessagePumpForUI : public MessagePumpWin { |
public: |
+ // Interface gets message and may process it. |
rvargas (doing something else)
2012/08/21 19:45:37
How about:
A MessageFilter implements the common P
yoichio
2012/08/22 08:06:50
Done.
|
+ class MessageFilter { |
+ public: |
+ virtual ~MessageFilter() {} |
+ virtual bool Init() = 0; |
+ // Implements the functionality exposed by the OS through PeekMessage. |
+ virtual BOOL DoPeekMessage(MSG* msg, |
rvargas (doing something else)
2012/08/21 19:45:37
nit: message
yoichio
2012/08/22 08:06:50
Done.
|
+ HWND hwnd, |
+ UINT msg_filter_min, |
+ UINT msg_filter_max, |
+ UINT remove_msg) = 0; |
+ // Returns true if |message| was completely consumed by the filter and |
rvargas (doing something else)
2012/08/21 19:45:37
It is not clear what is expected from an implement
yoichio
2012/08/22 08:06:50
How about this?
|
+ // should not be dispatched. |
+ virtual bool ProcessMessage(const MSG& msg) = 0; |
rvargas (doing something else)
2012/08/21 19:45:37
nit: message
rvargas (doing something else)
2012/08/21 19:45:37
On a more serious note, the interaction between a
yoichio
2012/08/22 08:06:50
Done.
yoichio
2012/08/22 08:06:50
Add comments.
|
+ }; |
+ |
// The application-defined code passed to the hook procedure. |
static const int kMessageFilterCode = 0x5001; |
@@ -142,8 +162,10 @@ class BASE_EXPORT MessagePumpForUI : public MessagePumpWin { |
void PumpOutPendingPaintMessages(); |
private: |
- static LRESULT CALLBACK WndProcThunk( |
- HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); |
+ static LRESULT CALLBACK WndProcThunk(HWND hwnd, |
+ UINT message, |
+ WPARAM wparam, |
+ LPARAM lparam); |
virtual void DoRunLoop(); |
void InitMessageWnd(); |
void WaitForWork(); |
@@ -158,6 +180,9 @@ class BASE_EXPORT MessagePumpForUI : public MessagePumpWin { |
// A hidden message-only window. |
HWND message_hwnd_; |
+ |
+ // A Proxy which gets message. |
rvargas (doing something else)
2012/08/21 19:45:37
nit: remove comment
yoichio
2012/08/22 08:06:50
Done.
|
+ scoped_ptr<MessageFilter> message_filter_; |
}; |
//----------------------------------------------------------------------------- |