diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 08:45:51 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-01 08:45:51 +0000 |
commit | 5cffdfd2397b2fc51e1597779cd4ce4bde9180e3 (patch) | |
tree | 72e0591bd92eb214eaebbfb01ac8fa2e7b06a146 /base/message_loop.cc | |
parent | b06ea9f4829138efafc5c750af7fa532a40518d6 (diff) | |
download | chromium_src-5cffdfd2397b2fc51e1597779cd4ce4bde9180e3.zip chromium_src-5cffdfd2397b2fc51e1597779cd4ce4bde9180e3.tar.gz chromium_src-5cffdfd2397b2fc51e1597779cd4ce4bde9180e3.tar.bz2 |
Help make Base compile under NaCl
This patch is a first attempt to get MessageLoop working inside NaCl. I
suspect we'll need to do something more complicated at some point, but this
version passes at least a few of the unit tests.
Review URL: http://codereview.chromium.org/5435001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r-- | base/message_loop.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc index 823670f..58aaa01 100644 --- a/base/message_loop.cc +++ b/base/message_loop.cc @@ -142,6 +142,11 @@ MessageLoop::MessageLoop(Type type) // TODO(sadrul): enable the new message pump when ready #define MESSAGE_PUMP_UI new base::MessagePumpForUI() #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() +#elif defined(OS_NACL) +// Currently NaCl doesn't have a UI or an IO MessageLoop. +// TODO(abarth): Figure out if we need these. +#define MESSAGE_PUMP_UI NULL +#define MESSAGE_PUMP_IO NULL #elif defined(OS_POSIX) // POSIX but not MACOSX. #define MESSAGE_PUMP_UI new base::MessagePumpForUI() #define MESSAGE_PUMP_IO new base::MessagePumpLibevent() @@ -661,7 +666,7 @@ void MessageLoopForUI::DidProcessMessage(const MSG& message) { } #endif // defined(OS_WIN) -#if !defined(OS_MACOSX) +#if !defined(OS_MACOSX) && !defined(OS_NACL) void MessageLoopForUI::AddObserver(Observer* observer) { pump_ui()->AddObserver(observer); } @@ -675,7 +680,7 @@ void MessageLoopForUI::Run(Dispatcher* dispatcher) { state_->dispatcher = dispatcher; RunHandler(); } -#endif // !defined(OS_MACOSX) +#endif // !defined(OS_MACOSX) && !defined(OS_NACL) //------------------------------------------------------------------------------ // MessageLoopForIO @@ -690,7 +695,7 @@ bool MessageLoopForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) { return pump_io()->WaitForIOCompletion(timeout, filter); } -#elif defined(OS_POSIX) +#elif defined(OS_POSIX) && !defined(OS_NACL) bool MessageLoopForIO::WatchFileDescriptor(int fd, bool persistent, |