diff options
author | Hidehiko Abe <hidehiko@google.com> | 2018-04-23 20:01:13 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-04-23 20:01:13 -0700 |
commit | ed7128dca79cff94e99465e3c1bc31d91d83c76d (patch) | |
tree | bd2d04362f66c36d4279f7a9735ba21ea3a2a021 /mojo/public/interfaces/bindings/tests/test_native_types.mojom | |
parent | d6187ab7d79d95d101c2ecb83aa98c05bcdcccd1 (diff) | |
parent | 0ab20ac2283987e63b0e7c1318db2a5cf7c668d2 (diff) | |
download | libchrome-ed7128dca79cff94e99465e3c1bc31d91d83c76d.tar.gz |
Migrate libmojo repository into libchrome, part 2. am: b268b43ac6
am: 0ab20ac228
Change-Id: I1b1afe0c902f1d122b100f5bf56d1df4a94eb090
Diffstat (limited to 'mojo/public/interfaces/bindings/tests/test_native_types.mojom')
-rw-r--r-- | mojo/public/interfaces/bindings/tests/test_native_types.mojom | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mojo/public/interfaces/bindings/tests/test_native_types.mojom b/mojo/public/interfaces/bindings/tests/test_native_types.mojom new file mode 100644 index 0000000000..3df43182a3 --- /dev/null +++ b/mojo/public/interfaces/bindings/tests/test_native_types.mojom @@ -0,0 +1,38 @@ +// Copyright 2015 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.test; + +import "mojo/public/interfaces/bindings/tests/rect.mojom"; + +// Used to verify that structs can be declared with no body in mojom. + +[Native] +struct PickledStruct; + +[Native] +enum PickledEnum; + +struct PickleContainer { + PickledStruct f_struct; + PickledEnum f_enum; +}; + +interface PicklePasser { + PassPickledStruct(PickledStruct pickle) => (PickledStruct passed); + PassPickledEnum(PickledEnum pickle) => (PickledEnum passed); + PassPickleContainer(PickleContainer container) => (PickleContainer passed); + PassPickles(array<PickledStruct> pickles) => (array<PickledStruct> passed); + PassPickleArrays(array<array<PickledStruct>> pickle_arrays) + => (array<array<PickledStruct>> passed); +}; + +// Used to verify support for native serialization of mojom-defined structs +// using StrucTraits with different variants of the Rect type from rect.mojom. + +interface RectService { + AddRect(TypemappedRect r); + GetLargestRect() => (TypemappedRect largest); + PassSharedRect(SharedTypemappedRect r) => (SharedTypemappedRect passed); +}; |