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

Unified Diff: mojo/common/platform_handle.mojom

Issue 2561003002: Add mojo structs for ScopedFD and ScopedHandle. (Closed)
Patch Set: Created 4 years 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/common/platform_handle.h ('k') | mojo/common/platform_handle.typemap » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/platform_handle.mojom
diff --git a/mojo/common/platform_handle.mojom b/mojo/common/platform_handle.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..34e42da495d01cbcd7f2f355d3359c497d4b3ef1
--- /dev/null
+++ b/mojo/common/platform_handle.mojom
@@ -0,0 +1,21 @@
+// 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.
+
+module mojo.common.mojom;
+
+[Native]
+// Corresponds to |base::ScopedFD| in base/files/scoped_file.h
+struct FileDescriptor {
+ handle wrapped_handle;
+};
+
+// Corresponds to |base::win::ScopedHandle| in base/win/scoped_handle.h
+struct WindowsHandle {
+ handle wrapped_handle;
+};
+
+union PlatformHandle {
+ FileDescriptor fd;
+ WindowsHandle windows_handle;
+};
« no previous file with comments | « mojo/common/platform_handle.h ('k') | mojo/common/platform_handle.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698