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

Unified Diff: ipc/attachment_broker_messages.h

Issue 1188923003: Stub in more IPC attachment brokering functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 5 years, 6 months 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: ipc/attachment_broker_messages.h
diff --git a/ipc/attachment_broker_messages.h b/ipc/attachment_broker_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..7944c5f40dd65a1b76149405f16b8945a5d79db3
--- /dev/null
+++ b/ipc/attachment_broker_messages.h
@@ -0,0 +1,57 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// IPC messages used by the attachment broker.
+// Multiply-included message file, hence no include guard.
+
+#include "ipc/brokerable_attachment.h"
+#include "ipc/ipc_message_macros.h"
+
+#if defined(OS_WIN)
+#include "ipc/handle_attachment_win.h"
+#endif // defined(OS_WIN)
+
+// ----------------------------------------------------------------------------
+// Serialization of structs.
+// ----------------------------------------------------------------------------
+
+#if defined(OS_WIN)
+IPC_STRUCT_TRAITS_BEGIN(IPC::internal::HandleAttachmentWin::WireFormat)
+IPC_STRUCT_TRAITS_MEMBER(handle)
+IPC_STRUCT_TRAITS_MEMBER(destination_process)
+IPC_STRUCT_TRAITS_MEMBER(attachment_id)
+IPC_STRUCT_TRAITS_END()
+#endif // defined(OS_WIN)
+
+#define IPC_MESSAGE_START AttachmentBrokerMsgStart
+
+// ----------------------------------------------------------------------------
+// Messages sent from the broker to a non-broker process.
+// ----------------------------------------------------------------------------
+
+#if defined(OS_WIN)
+// Sent from a broker to a non-broker to indicate that a windows HANDLE has been
+// brokered. Contains all information necessary for the non-broker to translate
+// a BrokerAttachment::AttachmentId to a BrokerAttachment.
+// Warning: This IPC message assumes that the sending and receiving processes
Tom Sepez 2015/06/19 18:04:10 nit: the warning is true for all types in IPC -- h
erikchen 2015/06/23 22:36:59 Chrome 32-bit Windows sometimes communicates with
+// have the same type for HANDLE.
+IPC_MESSAGE_CONTROL1(
+ AttachmentBrokerMsg_WinHandleHasBeenBrokered,
+ IPC::internal::HandleAttachmentWin::WireFormat /* wire_format */)
+#endif // defined(OS_WIN)
+
+// ----------------------------------------------------------------------------
+// Messages sent from a non-broker process to a broker process.
+// ----------------------------------------------------------------------------
+
+#if defined(OS_WIN)
+// Sent from a non-broker to a broker to request the duplication of a HANDLE
+// into a different process (possibly the broker process, or even the original
+// process).
+// Warning: This IPC message assumes that the sending and receiving processes
+// have the same type for HANDLE.
+IPC_MESSAGE_CONTROL1(
+ AttachmentBrokerMsg_RequestBrokerageOfWinHandle,
Tom Sepez 2015/06/19 18:04:10 nit: I think you want |brokering|, the gerund form
erikchen 2015/06/23 22:36:59 I went with your suggestion of DuplicateWinHandle
+ IPC::internal::HandleAttachmentWin::WireFormat /* wire_format */)
+#endif // defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698