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

Unified Diff: base/message_pump_win.h

Issue 15261005: Allow multiple base::MessagePumpForUI instances to be created simultanenously on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 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
« no previous file with comments | « base/base.gypi ('k') | base/message_pump_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_pump_win.h
diff --git a/base/message_pump_win.h b/base/message_pump_win.h
index 5ea195fb15ac87d9944b9a8b1121556e671364e7..67b076d6e35ea47ba9abe48825e2031df7d7d09e 100644
--- a/base/message_pump_win.h
+++ b/base/message_pump_win.h
@@ -17,6 +17,7 @@
#include "base/message_pump_observer.h"
#include "base/observer_list.h"
#include "base/time.h"
+#include "base/win/message_window.h"
#include "base/win/scoped_handle.h"
namespace base {
@@ -125,7 +126,9 @@ class BASE_EXPORT MessagePumpWin : public MessagePump {
// an excellent choice. It is also helpful that the starter messages that are
// placed in the queue when new task arrive also awakens DoRunLoop.
//
-class BASE_EXPORT MessagePumpForUI : public MessagePumpWin {
+class BASE_EXPORT MessagePumpForUI
+ : public MessagePumpWin,
+ public win::MessageWindow::Delegate {
public:
// A MessageFilter implements the common Peek/Translate/Dispatch code to deal
// with windows messages.
@@ -175,12 +178,14 @@ class BASE_EXPORT MessagePumpForUI : public MessagePumpWin {
void PumpOutPendingPaintMessages();
private:
- static LRESULT CALLBACK WndProcThunk(HWND window_handle,
- UINT message,
- WPARAM wparam,
- LPARAM lparam);
+ // win::MessageWindow::Delegate interface.
+ virtual bool HandleMessage(HWND hwnd,
+ UINT message,
+ WPARAM wparam,
+ LPARAM lparam,
+ LRESULT* result) OVERRIDE;
+
virtual void DoRunLoop();
- void InitMessageWnd();
void WaitForWork();
void HandleWorkMessage();
void HandleTimerMessage();
@@ -188,13 +193,10 @@ class BASE_EXPORT MessagePumpForUI : public MessagePumpWin {
bool ProcessMessageHelper(const MSG& msg);
bool ProcessPumpReplacementMessage();
- // Instance of the module containing the window procedure.
- HMODULE instance_;
+ scoped_ptr<MessageFilter> message_filter_;
// A hidden message-only window.
- HWND message_hwnd_;
-
- scoped_ptr<MessageFilter> message_filter_;
+ scoped_ptr<win::MessageWindow> window_;
};
//-----------------------------------------------------------------------------
« no previous file with comments | « base/base.gypi ('k') | base/message_pump_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698