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 "media/midi/midi_port_info.h" | 11 #include "media/midi/midi_port_info.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 #undef IPC_MESSAGE_EXPORT | 14 #undef IPC_MESSAGE_EXPORT |
15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
16 #define IPC_MESSAGE_START MIDIMsgStart | 16 #define IPC_MESSAGE_START MidiMsgStart |
17 | 17 |
18 IPC_STRUCT_TRAITS_BEGIN(media::MIDIPortInfo) | 18 IPC_STRUCT_TRAITS_BEGIN(media::MidiPortInfo) |
19 IPC_STRUCT_TRAITS_MEMBER(id) | 19 IPC_STRUCT_TRAITS_MEMBER(id) |
20 IPC_STRUCT_TRAITS_MEMBER(manufacturer) | 20 IPC_STRUCT_TRAITS_MEMBER(manufacturer) |
21 IPC_STRUCT_TRAITS_MEMBER(name) | 21 IPC_STRUCT_TRAITS_MEMBER(name) |
22 IPC_STRUCT_TRAITS_MEMBER(version) | 22 IPC_STRUCT_TRAITS_MEMBER(version) |
23 IPC_STRUCT_TRAITS_END() | 23 IPC_STRUCT_TRAITS_END() |
24 | 24 |
25 // Messages for IPC between MIDIDispatcher and MIDIDispatcherHost. | 25 // Messages for IPC between MidiDispatcher and MidiDispatcherHost. |
26 | 26 |
27 // Renderer request to browser for using system exclusive messages. | 27 // Renderer request to browser for using system exclusive messages. |
28 IPC_MESSAGE_CONTROL3(MIDIHostMsg_RequestSysExPermission, | 28 IPC_MESSAGE_CONTROL3(MidiHostMsg_RequestSysExPermission, |
29 int /* routing id */, | 29 int /* routing id */, |
30 int /* client id */, | 30 int /* client id */, |
31 GURL /* origin */) | 31 GURL /* origin */) |
32 | 32 |
33 // Renderer request to browser for canceling a previous permission request. | 33 // Renderer request to browser for canceling a previous permission request. |
34 IPC_MESSAGE_CONTROL3(MIDIHostMsg_CancelSysExPermissionRequest, | 34 IPC_MESSAGE_CONTROL3(MidiHostMsg_CancelSysExPermissionRequest, |
35 int /* render_view_id */, | 35 int /* render_view_id */, |
36 int /* bridge_id */, | 36 int /* bridge_id */, |
37 GURL /* GURL of the frame */) | 37 GURL /* GURL of the frame */) |
38 | 38 |
39 // Messages sent from the browser to the renderer. | 39 // Messages sent from the browser to the renderer. |
40 | 40 |
41 IPC_MESSAGE_ROUTED2(MIDIMsg_SysExPermissionApproved, | 41 IPC_MESSAGE_ROUTED2(MidiMsg_SysExPermissionApproved, |
42 int /* client id */, | 42 int /* client id */, |
43 bool /* success */) | 43 bool /* success */) |
44 | 44 |
45 // Messages for IPC between MIDIMessageFilter and MIDIHost. | 45 // Messages for IPC between MidiMessageFilter and MidiHost. |
46 | 46 |
47 // Renderer request to browser for access to MIDI services. | 47 // Renderer request to browser for access to MIDI services. |
48 IPC_MESSAGE_CONTROL1(MIDIHostMsg_StartSession, | 48 IPC_MESSAGE_CONTROL1(MidiHostMsg_StartSession, |
49 int /* client id */) | 49 int /* client id */) |
50 | 50 |
51 IPC_MESSAGE_CONTROL3(MIDIHostMsg_SendData, | 51 IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData, |
52 uint32 /* port */, | 52 uint32 /* port */, |
53 std::vector<uint8> /* data */, | 53 std::vector<uint8> /* data */, |
54 double /* timestamp */) | 54 double /* timestamp */) |
55 | 55 |
56 // Messages sent from the browser to the renderer. | 56 // Messages sent from the browser to the renderer. |
57 | 57 |
58 IPC_MESSAGE_CONTROL4(MIDIMsg_SessionStarted, | 58 IPC_MESSAGE_CONTROL4(MidiMsg_SessionStarted, |
59 int /* client id */, | 59 int /* client id */, |
60 bool /* success */, | 60 bool /* success */, |
61 media::MIDIPortInfoList /* input ports */, | 61 media::MidiPortInfoList /* input ports */, |
62 media::MIDIPortInfoList /* output ports */) | 62 media::MidiPortInfoList /* output ports */) |
63 | 63 |
64 IPC_MESSAGE_CONTROL3(MIDIMsg_DataReceived, | 64 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived, |
65 uint32 /* port */, | 65 uint32 /* port */, |
66 std::vector<uint8> /* data */, | 66 std::vector<uint8> /* data */, |
67 double /* timestamp */) | 67 double /* timestamp */) |
68 | 68 |
69 IPC_MESSAGE_CONTROL1(MIDIMsg_AcknowledgeSentData, | 69 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData, |
70 uint32 /* bytes sent */) | 70 uint32 /* bytes sent */) |
OLD | NEW |