• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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 package org.chromium.mojo.bindings.test.mojom.mojo;
6 
7 import org.chromium.mojo.bindings.MessageReceiver;
8 import org.chromium.mojo.bindings.test.mojom.mojo.IntegrationTestInterface.Method0Response;
9 import org.chromium.mojo.bindings.test.mojom.mojo.IntegrationTestInterface_Internal.IntegrationTestInterfaceMethod0ResponseParamsForwardToCallback;
10 
11 /**
12  * Helper class to access {@link IntegrationTestInterface_Internal} package protected method for
13  * tests.
14  */
15 public class IntegrationTestInterfaceTestHelper {
16     private static final class SinkMethod0Response implements Method0Response {
17         @Override
call(byte[] arg1)18         public void call(byte[] arg1) {}
19     }
20 
21     /**
22      * Creates a new {@link MessageReceiver} to use for the callback of
23      * |IntegrationTestInterface#method0(Method0Response)|.
24      */
newIntegrationTestInterfaceMethodCallback()25     public static MessageReceiver newIntegrationTestInterfaceMethodCallback() {
26         return new IntegrationTestInterfaceMethod0ResponseParamsForwardToCallback(
27                 new SinkMethod0Response());
28     }
29 }
30