Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / mojo / apps / js / test / js_to_cpp.mojom
1 module js_to_cpp {
2
3 // This struct encompasses all of the basic types, so that they
4 // may be sent from C++ to JS and back for validation.
5 struct EchoArgs {
6   int64 si64;
7   int32 si32;
8   int16 si16;
9   int8  si8;
10   uint64 ui64;
11   uint32 ui32;
12   uint16 ui16;
13   uint8  ui8;
14   float float_val;
15   float float_inf;
16   float float_nan;
17   double double_val;
18   double double_inf;
19   double double_nan;
20   string name;
21   string[] string_array;
22   handle<message_pipe> message_handle;
23   handle<data_pipe_consumer> data_handle;
24 };
25
26 interface CppSide {
27   StartTest();  // Sent for all tests to notify that the JS side is now ready.
28   TestFinished();  // Sent in echo / bit-flip tests to indicate end.
29   PingResponse();
30   EchoResponse(EchoArgs arg1, EchoArgs arg2);
31   BitFlipResponse(EchoArgs arg);
32 };
33
34 [Client=CppSide]
35 interface JsSide {
36   Ping();
37   Echo(int32 numIterations, EchoArgs arg);
38   BitFlip(EchoArgs arg);
39 };
40
41 }