OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // IPC messages for access to MIDI hardware. | 5 // IPC messages for access to MIDI hardware. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 #include "ipc/param_traits_macros.h" | 11 #include "ipc/param_traits_macros.h" |
12 #include "media/midi/midi_port_info.h" | 12 #include "media/midi/midi_port_info.h" |
13 #include "media/midi/midi_result.h" | 13 #include "media/midi/midi_result.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 #undef IPC_MESSAGE_EXPORT | 16 #undef IPC_MESSAGE_EXPORT |
17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
18 #define IPC_MESSAGE_START MidiMsgStart | 18 #define IPC_MESSAGE_START MidiMsgStart |
19 | 19 |
20 IPC_STRUCT_TRAITS_BEGIN(media::MidiPortInfo) | 20 IPC_STRUCT_TRAITS_BEGIN(media::MidiPortInfo) |
21 IPC_STRUCT_TRAITS_MEMBER(id) | 21 IPC_STRUCT_TRAITS_MEMBER(id) |
22 IPC_STRUCT_TRAITS_MEMBER(manufacturer) | 22 IPC_STRUCT_TRAITS_MEMBER(manufacturer) |
23 IPC_STRUCT_TRAITS_MEMBER(name) | 23 IPC_STRUCT_TRAITS_MEMBER(name) |
24 IPC_STRUCT_TRAITS_MEMBER(version) | 24 IPC_STRUCT_TRAITS_MEMBER(version) |
| 25 IPC_STRUCT_TRAITS_MEMBER(connected) |
25 IPC_STRUCT_TRAITS_END() | 26 IPC_STRUCT_TRAITS_END() |
26 | 27 |
27 IPC_ENUM_TRAITS_MAX_VALUE(media::MidiResult, media::MIDI_RESULT_LAST) | 28 IPC_ENUM_TRAITS_MAX_VALUE(media::MidiResult, media::MIDI_RESULT_LAST) |
28 | 29 |
29 // Messages for IPC between MidiDispatcher and MidiDispatcherHost. | 30 // Messages for IPC between MidiDispatcher and MidiDispatcherHost. |
30 | 31 |
31 // Renderer request to browser for using system exclusive messages. | 32 // Renderer request to browser for using system exclusive messages. |
32 IPC_MESSAGE_ROUTED3(MidiHostMsg_RequestSysExPermission, | 33 IPC_MESSAGE_ROUTED3(MidiHostMsg_RequestSysExPermission, |
33 int /* client id */, | 34 int /* client id */, |
34 GURL /* origin */, | 35 GURL /* origin */, |
(...skipping 18 matching lines...) Expand all Loading... |
53 IPC_MESSAGE_CONTROL0(MidiHostMsg_EndSession) | 54 IPC_MESSAGE_CONTROL0(MidiHostMsg_EndSession) |
54 | 55 |
55 // Messages sent from the browser to the renderer. | 56 // Messages sent from the browser to the renderer. |
56 | 57 |
57 IPC_MESSAGE_CONTROL1(MidiMsg_AddInputPort, | 58 IPC_MESSAGE_CONTROL1(MidiMsg_AddInputPort, |
58 media::MidiPortInfo /* input port */) | 59 media::MidiPortInfo /* input port */) |
59 | 60 |
60 IPC_MESSAGE_CONTROL1(MidiMsg_AddOutputPort, | 61 IPC_MESSAGE_CONTROL1(MidiMsg_AddOutputPort, |
61 media::MidiPortInfo /* output port */) | 62 media::MidiPortInfo /* output port */) |
62 | 63 |
| 64 IPC_MESSAGE_CONTROL2(MidiMsg_SetInputPortState, |
| 65 uint32 /* port */, |
| 66 bool /* connected */) |
| 67 |
| 68 IPC_MESSAGE_CONTROL2(MidiMsg_SetOutputPortState, |
| 69 uint32 /* port */, |
| 70 bool /* connected */) |
| 71 |
63 IPC_MESSAGE_CONTROL1(MidiMsg_SessionStarted, | 72 IPC_MESSAGE_CONTROL1(MidiMsg_SessionStarted, |
64 media::MidiResult /* result */) | 73 media::MidiResult /* result */) |
65 | 74 |
66 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived, | 75 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived, |
67 uint32 /* port */, | 76 uint32 /* port */, |
68 std::vector<uint8> /* data */, | 77 std::vector<uint8> /* data */, |
69 double /* timestamp */) | 78 double /* timestamp */) |
70 | 79 |
71 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData, | 80 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData, |
72 uint32 /* bytes sent */) | 81 uint32 /* bytes sent */) |
OLD | NEW |