summaryrefslogtreecommitdiffstats
path: root/base/message_loop.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 20:33:04 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 20:33:04 +0000
commit1a8f5d1d016723fb1fcc49b1fc5290fa1b7f2706 (patch)
tree7843845f2e67e3f021cff8244da0f1c9feae4385 /base/message_loop.h
parent8c237a11dcc958f063d14d4419524612ae8c6ac1 (diff)
downloadchromium_src-1a8f5d1d016723fb1fcc49b1fc5290fa1b7f2706.zip
chromium_src-1a8f5d1d016723fb1fcc49b1fc5290fa1b7f2706.tar.gz
chromium_src-1a8f5d1d016723fb1fcc49b1fc5290fa1b7f2706.tar.bz2
As an intermediate step towards having a message pump handling IO through completion ports, this CL creates two types of message pumps for windows: one to handle UI threads and another one to handle IO threads.
I'm basically moving stuff around, except by the fact that now UI threads will not process APCs or wait on objects (those things only happen on message loops of TYPE_IO) Review URL: http://codereview.chromium.org/3094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r--base/message_loop.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/base/message_loop.h b/base/message_loop.h
index 25b3cfa..cc67587 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -423,6 +423,12 @@ class MessageLoopForUI : public MessageLoop {
void WillProcessMessage(const MSG& message);
void DidProcessMessage(const MSG& message);
void PumpOutPendingPaintMessages();
+
+ protected:
+ // TODO(rvargas): Make this platform independent.
+ base::MessagePumpWin* pump_ui() {
+ return static_cast<base::MessagePumpForUI*>(pump_.get());
+ }
#endif // defined(OS_WIN)
};
@@ -452,11 +458,17 @@ class MessageLoopForIO : public MessageLoop {
}
#if defined(OS_WIN)
- typedef base::MessagePumpWin::Watcher Watcher;
+ typedef base::MessagePumpForIO::Watcher Watcher;
// Please see MessagePumpWin for definitions of these methods.
void WatchObject(HANDLE object, Watcher* watcher);
+ protected:
+ // TODO(rvargas): Make this platform independent.
+ base::MessagePumpForIO* pump_io() {
+ return static_cast<base::MessagePumpForIO*>(pump_.get());
+ }
+
#elif defined(OS_POSIX)
typedef base::MessagePumpLibevent::Watcher Watcher;
@@ -464,7 +476,7 @@ class MessageLoopForIO : public MessageLoop {
void WatchSocket(int socket, short interest_mask,
struct event* e, Watcher* watcher);
void UnwatchSocket(struct event* e);
-#endif // defined(OS_WIN)
+#endif // defined(OS_POSIX)
};
// Do not add any member variables to MessageLoopForIO! This is important b/c