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

Unified Diff: mojo/system/raw_channel.h

Issue 277083003: Mojo: (Theoretically) implement the read side of platform handle passing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asdf Created 6 years, 7 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 | « mojo/system/message_in_transit.cc ('k') | mojo/system/raw_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel.h
diff --git a/mojo/system/raw_channel.h b/mojo/system/raw_channel.h
index 5eb9d0f04f257d2b4f7259f31bd15234ae1e0a71..8b4ef35f65fe980ce662ead805ebea85a7a4ffe4 100644
--- a/mojo/system/raw_channel.h
+++ b/mojo/system/raw_channel.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
+#include "mojo/embedder/platform_handle_vector.h"
#include "mojo/embedder/scoped_platform_handle.h"
#include "mojo/system/constants.h"
#include "mojo/system/message_in_transit.h"
@@ -208,6 +209,15 @@ class MOJO_SYSTEM_IMPL_EXPORT RawChannel {
// returns |IO_FAILED| or |IO_PENDING|.
virtual IOResult ScheduleRead() = 0;
+ // Called by |OnReadCompleted()| to get the platform handles associated with
+ // the given platform handle table (from a message). This should only be
+ // called when |num_platform_handles| is nonzero. Returns null if the
+ // |num_platform_handles| handles are not available. Only called on the I/O
+ // thread (without |write_lock_| held).
+ virtual scoped_ptr<embedder::PlatformHandleVector> GetReadPlatformHandles(
+ size_t num_platform_handles,
+ const void* platform_handle_table) = 0;
+
// Writes contents in |write_buffer_no_lock()|.
// This class guarantees that:
// - the |PlatformHandle|s given by |GetPlatformHandlesToSend()| and the
« no previous file with comments | « mojo/system/message_in_transit.cc ('k') | mojo/system/raw_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698