summaryrefslogtreecommitdiffstats
path: root/mojo/public/interfaces/bindings/tests/test_native_types.mojom
blob: 3fceddefce0188686260feb4ea3a9c5b2ee9614b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// 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;

struct PickleContainer {
  PickledStruct pickle;
};

interface PicklePasser {
  PassPickle(PickledStruct pickle) => (PickledStruct passed);
  PassPickleContainer(PickleContainer container) => (PickleContainer passed);
  PassPickles(array<PickledStruct> pickles) => (array<PickledStruct> passed);
  PassPickleArrays(array<array<PickledStruct>> pickle_arrays)
      => (array<array<PickledStruct>> passed);
};

// TODO: crbug.com/596202
// 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(Rect r);
//   GetLargestRect() => (Rect largest);
// };