Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: mojo/public/interfaces/bindings/tests/sample_factory.mojom

Issue 332653002: Mojo: Fix the C++ bindings generator for methods taking imported interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import "sample_import.mojom"
6
5 [JavaPackage="org.chromium.mojo.bindings.test.sample"] 7 [JavaPackage="org.chromium.mojo.bindings.test.sample"]
6 module sample { 8 module sample {
7 9
8 // This sample shows how handles to MessagePipes can be sent as both parameters 10 // This sample shows how handles to MessagePipes can be sent as both parameters
9 // to methods as well as fields on structs. 11 // to methods as well as fields on structs.
10 12
11 struct Request { 13 struct Request {
12 int32 x; 14 int32 x;
13 handle<message_pipe> pipe; 15 handle<message_pipe> pipe;
14 handle<message_pipe>[] more_pipes; 16 handle<message_pipe>[] more_pipes;
15 }; 17 };
16 18
17 struct Response { 19 struct Response {
18 int32 x; 20 int32 x;
19 handle<message_pipe> pipe; 21 handle<message_pipe> pipe;
20 }; 22 };
21 23
22 interface Object { 24 interface Object {
23 SetName(string name); 25 SetName(string name);
24 GetName() => (string name); 26 GetName() => (string name);
25 }; 27 };
26 28
27 [Client=FactoryClient] 29 [Client=FactoryClient]
28 interface Factory { 30 interface Factory {
29 DoStuff(Request request, handle<message_pipe> pipe); 31 DoStuff(Request request, handle<message_pipe> pipe);
30 DoStuff2(handle<data_pipe_consumer> pipe); 32 DoStuff2(handle<data_pipe_consumer> pipe);
31 CreateObject(Object& obj); 33 CreateObject(Object& obj);
34 RequestImportedInterface(
35 imported.ImportedInterface& obj) => (imported.ImportedInterface& obj);
36 TakeImportedInterface(
37 imported.ImportedInterface obj) => (imported.ImportedInterface obj);
32 }; 38 };
33 39
34 interface FactoryClient { 40 interface FactoryClient {
35 DidStuff(Response response, string text); 41 DidStuff(Response response, string text);
36 DidStuff2(string text); 42 DidStuff2(string text);
37 }; 43 };
38 44
39 } // module sample 45 } // module sample
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/tests/handle_passing_unittest.cc ('k') | mojo/public/interfaces/bindings/tests/sample_import.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698