Index: mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/test_structs/Rect.java |
diff --git a/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/test_structs/Rect.java b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/test_structs/Rect.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..819d5269be307b69596ed28b0aff6ab42e335df8 |
--- /dev/null |
+++ b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/test_structs/Rect.java |
@@ -0,0 +1,61 @@ |
+// Copyright 2014 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. |
+ |
+// This file is autogenerated by: |
+// mojo/public/tools/bindings/mojom_bindings_generator.py |
+// For: |
+// mojo/public/interfaces/bindings/tests/test_structs.mojom |
+// |
+ |
+package org.chromium.mojo.bindings.test.mojom.test_structs; |
+ |
+public final class Rect extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 24; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 4); |
+ |
+ public int x; |
+ public int y; |
+ public int width; |
+ public int height; |
+ |
+ public Rect() { |
+ super(STRUCT_SIZE); |
+ } |
+ |
+ public static Rect deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static Rect decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ Rect result = new Rect(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ result.x = decoder0.readInt(8); |
+ } |
+ if (mainDataHeader.numFields > 1) { |
+ result.y = decoder0.readInt(12); |
+ } |
+ if (mainDataHeader.numFields > 2) { |
+ result.width = decoder0.readInt(16); |
+ } |
+ if (mainDataHeader.numFields > 3) { |
+ result.height = decoder0.readInt(20); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(x, 8); |
+ encoder0.encode(y, 12); |
+ encoder0.encode(width, 16); |
+ encoder0.encode(height, 20); |
+ } |
+} |
+ |