Implement about:ipc dialog for Mac.

Convert IPC logging trigger from x-process waitable event to a messages
sent to all processes.

Review URL: http://codereview.chromium.org/192070

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27405 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index ee0caaa6..ae0b48e 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -4,6 +4,24 @@
 
 #include "build/build_config.h"
 
+// Need to include this before most other files because it defines
+// IPC_MESSAGE_LOG_ENABLED. We need to use it to define
+// IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the
+// ViewMsgLog et al. functions.
+#include "ipc/ipc_message.h"
+
+// On Windows, the about:ipc dialog shows IPCs; on POSIX, we hook up a
+// logger in this file.  (We implement about:ipc on Mac but implement
+// the loggers here anyway).  We need to do this real early to be sure
+// IPC_MESSAGE_MACROS_LOG_ENABLED doesn't get undefined.
+#if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED)
+#define IPC_MESSAGE_MACROS_LOG_ENABLED
+#include "chrome/common/devtools_messages.h"
+#include "chrome/common/plugin_messages.h"
+#include "chrome/common/render_messages.h"
+#include "chrome/common/worker_messages.h"
+#endif
+
 #if defined(OS_WIN)
 #include <windows.h>
 #endif
@@ -25,16 +43,8 @@
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/env_vars.h"
-#include "ipc/ipc_message.h"
-
-// On Windows, the about:ipc dialog shows IPCs; on POSIX, we hook up a
-// logger in this file.
-#if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED)
-#define IPC_MESSAGE_MACROS_LOG_ENABLED
 #include "ipc/ipc_logging.h"
-#include "chrome/common/plugin_messages.h"
-#include "chrome/common/render_messages.h"
-#endif
+#include "ipc/ipc_message.h"
 
 // When true, this means that error dialogs should not be shown.
 static bool dialogs_are_suppressed_ = false;