diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-22 23:10:32 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-22 23:10:32 +0000 |
commit | 80058055afa94db18fa25662fd1f147e6cae15f8 (patch) | |
tree | cd1e3479a3a82fa9fd2d929e1362e55c91bce020 /chrome/common | |
parent | d800eb5acc42f2faa5437954042bd58043b6684b (diff) | |
download | chromium_src-80058055afa94db18fa25662fd1f147e6cae15f8.zip chromium_src-80058055afa94db18fa25662fd1f147e6cae15f8.tar.gz chromium_src-80058055afa94db18fa25662fd1f147e6cae15f8.tar.bz2 |
Bring up chrome/common/ipc_sync_message.cc on POSIX.
Review URL: http://codereview.chromium.org/16428
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/common.scons | 2 | ||||
-rw-r--r-- | chrome/common/ipc_sync_message.cc | 20 |
2 files changed, 16 insertions, 6 deletions
diff --git a/chrome/common/common.scons b/chrome/common/common.scons index 5f5e919..14c2b92 100644 --- a/chrome/common/common.scons +++ b/chrome/common/common.scons @@ -43,6 +43,7 @@ input_files = [] input_files.extend([ 'ipc_channel_proxy.cc', + 'ipc_sync_message.cc', ]) if not env.Bit('mac'): @@ -97,7 +98,6 @@ if env.Bit('windows'): 'gfx/text_elider.cc', 'ipc_logging.cc', 'ipc_sync_channel.cc', - 'ipc_sync_message.cc', 'jstemplate_builder.cc', 'l10n_util.cc', 'message_router.cc', diff --git a/chrome/common/ipc_sync_message.cc b/chrome/common/ipc_sync_message.cc index fd392a7..828584c 100644 --- a/chrome/common/ipc_sync_message.cc +++ b/chrome/common/ipc_sync_message.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if defined(OS_WIN) #include <windows.h> +#endif #include <stack> #include "chrome/common/ipc_sync_message.h" @@ -13,17 +15,24 @@ namespace IPC { uint32 SyncMessage::next_id_ = 0; #define kSyncMessageHeaderSize 4 +#if defined(OS_WIN) +// TODO(playmobil): reinstantiate once ObjectWatcher is ported. // A dummy handle used by EnableMessagePumping. HANDLE dummy_event = ::CreateEvent(NULL, TRUE, TRUE, NULL); +#endif SyncMessage::SyncMessage( int32 routing_id, - WORD type, + uint16 type, PriorityValue priority, MessageReplyDeserializer* deserializer) : Message(routing_id, type, priority), - deserializer_(deserializer), - pump_messages_event_(NULL) { + deserializer_(deserializer) +#if defined(OS_WIN) + // TODO(playmobil): reinstantiate once ObjectWatcher is ported. + , pump_messages_event_(NULL) +#endif + { set_sync(); set_unblock(true); @@ -40,10 +49,13 @@ MessageReplyDeserializer* SyncMessage::GetReplyDeserializer() { return rv; } +#if defined(OS_WIN) +// TODO(playmobil): reinstantiate once ObjectWatcher is ported. void SyncMessage::EnableMessagePumping() { DCHECK(!pump_messages_event_); set_pump_messages_event(dummy_event); } +#endif // defined(OS_WIN) bool SyncMessage::IsMessageReplyTo(const Message& msg, int request_id) { if (!msg.is_reply()) @@ -100,8 +112,6 @@ bool SyncMessage::ReadSyncHeader(const Message& msg, SyncHeader* header) { bool SyncMessage::WriteSyncHeader(Message* msg, const SyncHeader& header) { DCHECK(msg->is_sync() || msg->is_reply()); DCHECK(msg->payload_size() == 0); - - void* iter = NULL; bool result = msg->WriteInt(header.message_id); if (!result) { NOTREACHED(); |