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

Unified Diff: base/message_loop.cc

Issue 495002: Changes to base/ from a combination of FreeBSD and OpenBSD patches. (Closed)
Patch Set: minor tweaks Created 11 years 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
Index: base/message_loop.cc
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 64913e575badc303a16ae823e4138052a6fe7b41..0d818065a0222ca527c1753c449e40652b70040e 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -20,7 +20,7 @@
#include "base/message_pump_libevent.h"
#include "base/third_party/valgrind/valgrind.h"
#endif
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
#include "base/message_pump_glib.h"
#endif
@@ -99,9 +99,9 @@ MessageLoop::MessageLoop(Type type)
if (type_ == TYPE_UI) {
#if defined(OS_MACOSX)
pump_ = base::MessagePumpMac::Create();
-#elif defined(OS_LINUX)
+#else
pump_ = new base::MessagePumpForUI();
-#endif // OS_LINUX
+#endif
} else if (type_ == TYPE_IO) {
pump_ = new base::MessagePumpLibevent();
} else {
@@ -194,7 +194,7 @@ void MessageLoop::RunInternal() {
StartHistogrammer();
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if !defined(OS_MACOSX)
if (state_->dispatcher && type() == TYPE_UI) {
static_cast<base::MessagePumpForUI*>(pump_.get())->
RunWithDispatcher(this, state_->dispatcher);
@@ -487,7 +487,7 @@ MessageLoop::AutoRunState::AutoRunState(MessageLoop* loop) : loop_(loop) {
// Initialize the other fields:
quit_received = false;
-#if defined(OS_WIN) || defined(OS_LINUX)
+#if !defined(OS_MACOSX)
dispatcher = NULL;
#endif
}
@@ -591,7 +591,7 @@ void MessageLoopForUI::PumpOutPendingPaintMessages() {
#endif // defined(OS_WIN)
-#if defined(OS_LINUX) || defined(OS_WIN)
+#if !defined(OS_MACOSX)
void MessageLoopForUI::AddObserver(Observer* observer) {
pump_ui()->AddObserver(observer);
}
@@ -605,7 +605,7 @@ void MessageLoopForUI::Run(Dispatcher* dispatcher) {
state_->dispatcher = dispatcher;
RunHandler();
}
-#endif // defined(OS_LINUX) || defined(OS_WIN)
+#endif // !defined(OS_MACOSX)
//------------------------------------------------------------------------------
// MessageLoopForIO
« base/message_loop.h ('K') | « base/message_loop.h ('k') | base/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698