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

Side by Side Diff: mojo/public/interfaces/bindings/interface_control_messages.mojom

Issue 1741963002: Auto-formatted all .mojom files. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 [DartPackage="mojo", JavaPackage="org.chromium.mojo.bindings"] 5 [DartPackage="mojo",
6 JavaPackage="org.chromium.mojo.bindings"]
6 module mojo; 7 module mojo;
7 8
8 // For each message pipe representing a user-defined interface, some control 9 // For each message pipe representing a user-defined interface, some control
9 // functions are provided at the same end of the message pipe as the 10 // functions are provided at the same end of the message pipe as the
10 // user-defined interface, providing information about the user-defined 11 // user-defined interface, providing information about the user-defined
11 // interface and controlling behavior of the message pipe. 12 // interface and controlling behavior of the message pipe.
12 13
13 //////////////////////////////////////////////////////////////////////////////// 14 ////////////////////////////////////////////////////////////////////////////////
14 // Run@0xFFFFFFFF(RunInput input) => (RunOutput? output); 15 // Run@0xFFFFFFFF(RunInput input) => (RunOutput? output);
15 // 16 //
(...skipping 15 matching lines...) Expand all
31 // }; 32 // };
32 // union RunOutput { 33 // union RunOutput {
33 // QueryVersionResult query_version_result; 34 // QueryVersionResult query_version_result;
34 // }; 35 // };
35 36
36 const uint32 kRunMessageId = 0xFFFFFFFF; 37 const uint32 kRunMessageId = 0xFFFFFFFF;
37 38
38 struct RunMessageParams { 39 struct RunMessageParams {
39 // The reserved fields make the layout compatible with the RunInput union 40 // The reserved fields make the layout compatible with the RunInput union
40 // described above. 41 // described above.
41 uint32 reserved0; // Must be set to 16. 42 uint32 reserved0; // Must be set to 16.
jamesr 2016/02/29 23:40:49 two spaces before the start of a comment is fairly
vtl 2016/02/29 23:41:59 I think in general, we prefer two spaces before th
azani 2016/03/04 01:08:48 Done.
42 uint32 reserved1; // Must be set to 0; 43 uint32 reserved1; // Must be set to 0;
43 QueryVersion query_version; 44 QueryVersion query_version;
44 }; 45 };
45 46
46 struct RunResponseMessageParams { 47 struct RunResponseMessageParams {
47 // The reserved fields make the layout compatible with the RunOutput union 48 // The reserved fields make the layout compatible with the RunOutput union
48 // described above. 49 // described above.
49 uint32 reserved0; // Must be set to 16. 50 uint32 reserved0; // Must be set to 16.
50 uint32 reserved1; // Must be set to 0. 51 uint32 reserved1; // Must be set to 0.
51 QueryVersionResult query_version_result; 52 QueryVersionResult query_version_result;
52 }; 53 };
53 54
54 // Queries the max supported version of the user-defined interface. 55 // Queries the max supported version of the user-defined interface.
55 struct QueryVersion { 56 struct QueryVersion{};
vtl 2016/02/29 23:41:59 This seems to be broken. At the very least, there
azani 2016/03/04 01:08:48 Done.
56 };
57 struct QueryVersionResult { 57 struct QueryVersionResult {
58 uint32 version; 58 uint32 version;
59 }; 59 };
60 60
61 //////////////////////////////////////////////////////////////////////////////// 61 ////////////////////////////////////////////////////////////////////////////////
62 // RunOrClosePipe@0xFFFFFFFE(RunOrClosePipeInput input); 62 // RunOrClosePipe@0xFFFFFFFE(RunOrClosePipeInput input);
63 // 63 //
64 // This control function runs the input command. If the operation fails or the 64 // This control function runs the input command. If the operation fails or the
65 // command is not supported, the message pipe is closed. 65 // command is not supported, the message pipe is closed.
66 // 66 //
67 // TODO(yzshen): Once union support is ready, switch the following definition 67 // TODO(yzshen): Once union support is ready, switch the following definition
68 // to: 68 // to:
69 // struct RunOrClosePipeMessageParams { 69 // struct RunOrClosePipeMessageParams {
70 // RunOrClosePipeInput input; 70 // RunOrClosePipeInput input;
71 // }; 71 // };
72 // union RunOrClosePipeInput { 72 // union RunOrClosePipeInput {
73 // RequireVersion require_version; 73 // RequireVersion require_version;
74 // }; 74 // };
75 75
76 const uint32 kRunOrClosePipeMessageId = 0xFFFFFFFE; 76 const uint32 kRunOrClosePipeMessageId = 0xFFFFFFFE;
77 77
78 struct RunOrClosePipeMessageParams { 78 struct RunOrClosePipeMessageParams {
79 // The reserved fields make the layout compatible with the RunOrClosePipeInput 79 // The reserved fields make the layout compatible with the RunOrClosePipeInput
80 // union described above. 80 // union described above.
81 uint32 reserved0; // Must be set to 16. 81 uint32 reserved0; // Must be set to 16.
82 uint32 reserved1; // Must be set to 0. 82 uint32 reserved1; // Must be set to 0.
83 RequireVersion require_version; 83 RequireVersion require_version;
84 }; 84 };
85 85
86 // If the specified version of the user-defined interface is not supported, the 86 // If the specified version of the user-defined interface is not supported, the
87 // function fails and the pipe is closed. 87 // function fails and the pipe is closed.
88 struct RequireVersion { 88 struct RequireVersion {
89 uint32 version; 89 uint32 version;
90 }; 90 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698