diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-18 18:46:26 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-18 18:46:26 +0000 |
commit | 36987e9fae95a51a980b4f0d71ca2df1a630407e (patch) | |
tree | 8d77b940020eb84b1926b41c8e5cec964299038c /base/message_loop.h | |
parent | 5a22409d7b625fa1f2a03194ff6c011f82f150dc (diff) | |
download | chromium_src-36987e9fae95a51a980b4f0d71ca2df1a630407e.zip chromium_src-36987e9fae95a51a980b4f0d71ca2df1a630407e.tar.gz chromium_src-36987e9fae95a51a980b4f0d71ca2df1a630407e.tar.bz2 |
Use libevent, second try. Changes this time:
- remove bogus include of base/completion_callback.h
- add DEPS rules to allow including third_party/libevent
Review URL: http://codereview.chromium.org/2964
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2371 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r-- | base/message_loop.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/base/message_loop.h b/base/message_loop.h index a65a2e8..51093c6 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -21,6 +21,8 @@ // We need this to declare base::MessagePumpWin::Dispatcher, which we should // really just eliminate. #include "base/message_pump_win.h" +#elif defined(OS_POSIX) +#include "base/message_pump_libevent.h" #endif // A MessageLoop is used to process events for a particular thread. There is @@ -274,6 +276,11 @@ class MessageLoop : public base::MessagePump::Delegate { base::MessagePumpWin* pump_win() { return static_cast<base::MessagePumpWin*>(pump_.get()); } +#elif defined(OS_POSIX) + base::MessagePumpLibevent* pump_libevent() { + return static_cast<base::MessagePumpLibevent*>(pump_.get()); + } + protected: #endif // A function to encapsulate all the exception handling capability in the @@ -450,6 +457,14 @@ class MessageLoopForIO : public MessageLoop { // Please see MessagePumpWin for definitions of these methods. void WatchObject(HANDLE object, Watcher* watcher); + +#elif defined(OS_POSIX) + typedef base::MessagePumpLibevent::Watcher Watcher; + + // Please see MessagePumpLibevent for definitions of these methods. + void WatchSocket(int socket, short interest_mask, + struct event* e, Watcher* watcher); + void UnwatchSocket(struct event* e); #endif // defined(OS_WIN) }; |