1// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5[JavaPackage="org.chromium.mojo.native_types"]
6module mojo.native;
7
8struct SerializedHandle {
9  handle the_handle;
10
11  enum Type {
12    MOJO_HANDLE,
13    PLATFORM_FILE,
14    WIN_HANDLE,
15    MACH_PORT,
16    FUCHSIA_HANDLE,
17  };
18
19  Type type;
20};
21
22[CustomSerializer]
23struct NativeStruct {
24  array<uint8> data;
25  array<SerializedHandle>? handles;
26};
27