Stub in more IPC attachment brokering functionality.
This CL fills in most of the logic for sending a Windows HANDLE from a
non-broker process to the broker process. This consists of several small
changes:
- Create the new IPC messages AttachmentBrokerMsg_WinHandleHasBeenBrokered and
AttachmentBrokerMsg_RequestBrokerageOfWinHandle.
- Add a sender_ member variable to AttachmentBrokerWin.
- Define the wire format for HandleAttachmentWin.
- Add logic to ChannelWin to send
AttachmentBrokerMsg_RequestBrokerageOfWinHandle for each HANDLE attachment.
BUG=466437
Review URL: https://codereview.chromium.org/1188923003
Cr-Commit-Position: refs/heads/master@{#337689}
diff --git a/ipc/ipc_message_attachment.h b/ipc/ipc_message_attachment.h
index 63dddfe..e7553d2 100644
--- a/ipc/ipc_message_attachment.h
+++ b/ipc/ipc_message_attachment.h
@@ -18,9 +18,9 @@
: public base::RefCounted<MessageAttachment> {
public:
enum Type {
- TYPE_PLATFORM_FILE, // The instance is |PlatformFileAttachment|.
- TYPE_MOJO_HANDLE, // The instance is |MojoHandleAttachment|.
- TYPE_WIN_HANDLE, // The instance is |HandleAttachmentWin|.
+ TYPE_PLATFORM_FILE, // The instance is |PlatformFileAttachment|.
+ TYPE_MOJO_HANDLE, // The instance is |MojoHandleAttachment|.
+ TYPE_BROKERABLE_ATTACHMENT, // The instance is |BrokerableAttachment|.
};
virtual Type GetType() const = 0;