| Index: mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/imported/ImportedInterfaceInternal.java
|
| diff --git a/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/imported/ImportedInterfaceInternal.java b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/imported/ImportedInterfaceInternal.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b43fe0dc238ba9c1fef5df3ae844908da453047f
|
| --- /dev/null
|
| +++ b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/imported/ImportedInterfaceInternal.java
|
| @@ -0,0 +1,114 @@
|
| +// 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/sample_import.mojom
|
| +//
|
| +
|
| +package org.chromium.mojo.bindings.test.mojom.imported;
|
| +
|
| +class ImportedInterfaceInternal {
|
| +
|
| + public static final org.chromium.mojo.bindings.Interface.Manager<ImportedInterface, ImportedInterface.Proxy> MANAGER =
|
| + new org.chromium.mojo.bindings.Interface.Manager<ImportedInterface, ImportedInterface.Proxy>() {
|
| +
|
| + public Proxy buildProxy(org.chromium.mojo.system.Core core,
|
| + org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
| + return new Proxy(core, messageReceiver);
|
| + }
|
| +
|
| + public Stub buildStub(org.chromium.mojo.system.Core core, ImportedInterface impl) {
|
| + return new Stub(core, impl);
|
| + }
|
| +
|
| + public ImportedInterface[] buildArray(int size) {
|
| + return new ImportedInterface[size];
|
| + }
|
| + };
|
| +
|
| + private static final int DO_SOMETHING_ORDINAL = 0;
|
| +
|
| + static final class Proxy extends org.chromium.mojo.bindings.Interface.AbstractProxy implements ImportedInterface.Proxy {
|
| +
|
| + Proxy(org.chromium.mojo.system.Core core,
|
| + org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
| + super(core, messageReceiver);
|
| + }
|
| +
|
| + @Override
|
| + public void doSomething() {
|
| + ImportedInterfaceDoSomethingParams message = new ImportedInterfaceDoSomethingParams();
|
| + getMessageReceiver().accept(
|
| + message.serializeWithHeader(
|
| + getCore(),
|
| + new org.chromium.mojo.bindings.MessageHeader(DO_SOMETHING_ORDINAL)));
|
| + }
|
| +
|
| + }
|
| +
|
| + static final class Stub extends org.chromium.mojo.bindings.Interface.Stub<ImportedInterface> {
|
| +
|
| + Stub(org.chromium.mojo.system.Core core, ImportedInterface impl) {
|
| + super(core, impl);
|
| + }
|
| +
|
| + @Override
|
| + public boolean accept(org.chromium.mojo.bindings.MessageWithHeader message) {
|
| + try {
|
| + org.chromium.mojo.bindings.MessageHeader header = message.getHeader();
|
| + if (!header.validateHeader(org.chromium.mojo.bindings.MessageHeader.NO_FLAG)) {
|
| + return false;
|
| + }
|
| + switch(header.getType()) {
|
| + case DO_SOMETHING_ORDINAL: {
|
| + ImportedInterfaceDoSomethingParams.deserialize(message.getPayload());
|
| + getImpl().doSomething();
|
| + return true;
|
| + }
|
| + default:
|
| + return false;
|
| + }
|
| + } catch (org.chromium.mojo.bindings.DeserializationException e) {
|
| + return false;
|
| + }
|
| + }
|
| +
|
| + @Override
|
| + public boolean acceptWithResponder(org.chromium.mojo.bindings.MessageWithHeader message, org.chromium.mojo.bindings.MessageReceiver receiver) {
|
| + return false;
|
| + }
|
| + }
|
| +
|
| + static final class ImportedInterfaceDoSomethingParams extends org.chromium.mojo.bindings.Struct {
|
| +
|
| + private static final int STRUCT_SIZE = 8;
|
| + private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 0);
|
| +
|
| + public ImportedInterfaceDoSomethingParams() {
|
| + super(STRUCT_SIZE);
|
| + }
|
| +
|
| + public static ImportedInterfaceDoSomethingParams deserialize(org.chromium.mojo.bindings.Message message) {
|
| + return decode(new org.chromium.mojo.bindings.Decoder(message));
|
| + }
|
| +
|
| + public static ImportedInterfaceDoSomethingParams decode(org.chromium.mojo.bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + ImportedInterfaceDoSomethingParams result = new ImportedInterfaceDoSomethingParams();
|
| + decoder0.readDataHeader();
|
| + return result;
|
| + }
|
| +
|
| + @Override
|
| + protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
| + encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
| + }
|
| + }
|
| +
|
| +}
|
| +
|
|
|