| Index: ipc/attachment_broker_win.cc
|
| diff --git a/ipc/attachment_broker_win.cc b/ipc/attachment_broker_win.cc
|
| index 867d2712d61d56260af69405d4d2b65e5288864a..89d193c7326bc13e73c774ae9e4346daa9192518 100644
|
| --- a/ipc/attachment_broker_win.cc
|
| +++ b/ipc/attachment_broker_win.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "ipc/attachment_broker_win.h"
|
|
|
| +#include "base/process/process.h"
|
| #include "ipc/attachment_broker_messages.h"
|
| #include "ipc/brokerable_attachment.h"
|
| #include "ipc/handle_attachment_win.h"
|
| @@ -45,4 +46,25 @@ bool AttachmentBrokerWin::GetAttachmentWithId(
|
| return false;
|
| }
|
|
|
| +bool AttachmentBrokerWin::OnMessageReceived(const Message& msg) {
|
| + bool handled = true;
|
| + IPC_BEGIN_MESSAGE_MAP(AttachmentBrokerWin, msg)
|
| + IPC_MESSAGE_HANDLER(AttachmentBrokerMsg_WinHandleHasBeenDuplicated,
|
| + OnWinHandleHasBeenDuplicated)
|
| + IPC_MESSAGE_UNHANDLED(handled = false)
|
| + IPC_END_MESSAGE_MAP()
|
| + return handled;
|
| +}
|
| +
|
| +void AttachmentBrokerWin::OnWinHandleHasBeenDuplicated(
|
| + const IPC::internal::HandleAttachmentWin::WireFormat& wire_format) {
|
| + // The IPC message was intended for a different process. Ignore it.
|
| + if (wire_format.destination_process != base::Process::Current().Pid())
|
| + return;
|
| +
|
| + scoped_refptr<BrokerableAttachment> attachment(
|
| + new IPC::internal::HandleAttachmentWin(wire_format));
|
| + attachments_.push_back(attachment);
|
| +}
|
| +
|
| } // namespace IPC
|
|
|