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

Unified Diff: mojo/edk/embedder/named_platform_handle_utils.h

Issue 2282413004: Support creating mojo peer connections from named pipes. (Closed)
Patch Set: Created 4 years, 4 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/edk/embedder/named_platform_handle.h ('k') | mojo/edk/embedder/named_platform_handle_utils_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/named_platform_handle_utils.h
diff --git a/mojo/edk/embedder/named_platform_handle_utils.h b/mojo/edk/embedder/named_platform_handle_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b856bb52f03c3ff0ac8c30468a9724704810045
--- /dev/null
+++ b/mojo/edk/embedder/named_platform_handle_utils.h
@@ -0,0 +1,31 @@
+// Copyright 2016 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.
+
+#ifndef MOJO_EDK_EMBEDDER_NAMED_PLATFORM_HANDLE_UTILS_H_
+#define MOJO_EDK_EMBEDDER_NAMED_PLATFORM_HANDLE_UTILS_H_
+
+#include "build/build_config.h"
+#include "mojo/edk/embedder/scoped_platform_handle.h"
+#include "mojo/edk/system/system_impl_export.h"
+
+namespace mojo {
+namespace edk {
+
+struct NamedPlatformHandle;
+
+// Creates a client platform handle from |handle|. This may block until |handle|
+// is ready to receive connections.
+MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle
+CreateClientHandle(const NamedPlatformHandle& handle);
+
+// Creates a server platform handle from |handle|. On Windows, if
+// |enforce_uniqueness| is true, this will fail if another pipe with the same
+// name exists. On other platforms, |enforce_uniqueness| must be false.
+MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle
+CreateServerHandle(const NamedPlatformHandle& handle, bool enforce_uniqueness);
+
+} // namespace edk
+} // namespace mojo
+
+#endif // MOJO_EDK_EMBEDDER_NAMED_PLATFORM_HANDLE_UTILS_H_
« no previous file with comments | « mojo/edk/embedder/named_platform_handle.h ('k') | mojo/edk/embedder/named_platform_handle_utils_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698