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

Unified Diff: ipc/ipc_message_attachment_set.h

Issue 866223005: IPC: Add MojoHandleAttachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing windows build again... Created 5 years, 10 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
« no previous file with comments | « ipc/ipc_message_attachment.h ('k') | ipc/ipc_message_attachment_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_attachment_set.h
diff --git a/ipc/ipc_message_attachment_set.h b/ipc/ipc_message_attachment_set.h
index a216493f303c46fbcf6d2707bd5bcac2e5d61fda..7e848bd3f544207c35f117f5cd06b7055c51e710 100644
--- a/ipc/ipc_message_attachment_set.h
+++ b/ipc/ipc_message_attachment_set.h
@@ -35,6 +35,9 @@ class IPC_EXPORT MessageAttachmentSet
unsigned size() const;
// Return the number of file descriptors
unsigned num_descriptors() const;
+ // Return the number of mojo handles in the attachment set
+ unsigned num_mojo_handles() const;
+
// Return true if no unconsumed descriptors remain
bool empty() const { return 0 == size(); }
@@ -48,6 +51,11 @@ class IPC_EXPORT MessageAttachmentSet
// returns: an attachment, or nullptr on error
scoped_refptr<MessageAttachment> GetAttachmentAt(unsigned index);
+ // This must be called after transmitting the descriptors returned by
+ // PeekDescriptors. It marks all the descriptors as consumed and closes those
+ // which are auto-close.
+ void CommitAll();
+
#if defined(OS_POSIX)
// This is the maximum number of descriptors per message. We need to know this
// because the control message kernel interface has to be given a buffer which
@@ -66,10 +74,6 @@ class IPC_EXPORT MessageAttachmentSet
// must be called after these descriptors have been transmitted.
// buffer: (output) a buffer of, at least, size() integers.
void PeekDescriptors(base::PlatformFile* buffer) const;
- // This must be called after transmitting the descriptors returned by
- // PeekDescriptors. It marks all the descriptors as consumed and closes those
- // which are auto-close.
- void CommitAll();
// Returns true if any contained file descriptors appear to be handles to a
// directory.
bool ContainsDirectoryDescriptor() const;
« no previous file with comments | « ipc/ipc_message_attachment.h ('k') | ipc/ipc_message_attachment_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698