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

Unified Diff: ipc/ipc_message_attachment.h

Issue 2504063002: Revert of Remove IPC::BrokerableAttachment. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « ipc/ipc_message.cc ('k') | ipc/ipc_message_attachment_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_attachment.h
diff --git a/ipc/ipc_message_attachment.h b/ipc/ipc_message_attachment.h
index 9ff1de8c32f53b6b8ce709ab3891ae2e2398b69e..7f7137d87b20f7483fdcfbfc75406ed1beb1c5fc 100644
--- a/ipc/ipc_message_attachment.h
+++ b/ipc/ipc_message_attachment.h
@@ -10,7 +10,6 @@
#include "base/memory/ref_counted.h"
#include "base/pickle.h"
#include "build/build_config.h"
-#include "ipc/ipc.mojom.h"
#include "ipc/ipc_export.h"
namespace IPC {
@@ -19,9 +18,17 @@
// or a mojo |MessagePipe|. |GetType()| returns the type of the subclass.
class IPC_EXPORT MessageAttachment : public base::Pickle::Attachment {
public:
- using Type = mojom::SerializedHandle::Type;
+ enum Type {
+ 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;
+
+#if defined(OS_POSIX)
+ virtual base::PlatformFile TakePlatformFile() = 0;
+#endif // OS_POSIX
protected:
friend class base::RefCountedThreadSafe<MessageAttachment>;
« no previous file with comments | « ipc/ipc_message.cc ('k') | ipc/ipc_message_attachment_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698