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
3 // found in the LICENSE file.
5 // IPC messages for access to MIDI hardware.
6 // Multiply-included message file, hence no include guard.
8 #include "base/basictypes.h"
9 #include "content/common/content_export.h"
10 #include "ipc/ipc_message_macros.h"
11 #include "media/midi/midi_port_info.h"
14 #undef IPC_MESSAGE_EXPORT
15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
16 #define IPC_MESSAGE_START MIDIMsgStart
18 IPC_STRUCT_TRAITS_BEGIN(media::MIDIPortInfo
)
19 IPC_STRUCT_TRAITS_MEMBER(id
)
20 IPC_STRUCT_TRAITS_MEMBER(manufacturer
)
21 IPC_STRUCT_TRAITS_MEMBER(name
)
22 IPC_STRUCT_TRAITS_MEMBER(version
)
23 IPC_STRUCT_TRAITS_END()
25 // Messages for IPC between MIDIDispatcher and MIDIDispatcherHost.
27 // Renderer request to browser for using system exclusive messages.
28 IPC_MESSAGE_CONTROL3(MIDIHostMsg_RequestSysExPermission
,
33 // Renderer request to browser for canceling a previous permission request.
34 IPC_MESSAGE_CONTROL3(MIDIHostMsg_CancelSysExPermissionRequest
,
35 int /* render_view_id */,
37 GURL
/* GURL of the frame */)
39 // Messages sent from the browser to the renderer.
41 IPC_MESSAGE_ROUTED2(MIDIMsg_SysExPermissionApproved
,
45 // Messages for IPC between MIDIMessageFilter and MIDIHost.
47 // Renderer request to browser for access to MIDI services.
48 IPC_MESSAGE_CONTROL1(MIDIHostMsg_StartSession
,
51 IPC_MESSAGE_CONTROL3(MIDIHostMsg_SendData
,
53 std::vector
<uint8
> /* data */,
54 double /* timestamp */)
56 // Messages sent from the browser to the renderer.
58 IPC_MESSAGE_CONTROL4(MIDIMsg_SessionStarted
,
61 media::MIDIPortInfoList
/* input ports */,
62 media::MIDIPortInfoList
/* output ports */)
64 IPC_MESSAGE_CONTROL3(MIDIMsg_DataReceived
,
66 std::vector
<uint8
> /* data */,
67 double /* timestamp */)
69 IPC_MESSAGE_CONTROL1(MIDIMsg_AcknowledgeSentData
,
70 uint32
/* bytes sent */)