[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / content / common / media / midi_messages.h
blob599f42c8ab95a1815a617672c05d3dbe1ddf4842
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 "ipc/param_traits_macros.h"
12 #include "media/midi/midi_port_info.h"
13 #include "media/midi/midi_result.h"
14 #include "url/gurl.h"
16 #undef IPC_MESSAGE_EXPORT
17 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
18 #define IPC_MESSAGE_START MidiMsgStart
20 IPC_STRUCT_TRAITS_BEGIN(media::MidiPortInfo)
21 IPC_STRUCT_TRAITS_MEMBER(id)
22 IPC_STRUCT_TRAITS_MEMBER(manufacturer)
23 IPC_STRUCT_TRAITS_MEMBER(name)
24 IPC_STRUCT_TRAITS_MEMBER(version)
25 IPC_STRUCT_TRAITS_END()
27 IPC_ENUM_TRAITS_MAX_VALUE(media::MidiResult, media::MIDI_RESULT_LAST)
29 // Messages for IPC between MidiDispatcher and MidiDispatcherHost.
31 // Renderer request to browser for using system exclusive messages.
32 IPC_MESSAGE_ROUTED3(MidiHostMsg_RequestSysExPermission,
33 int /* client id */,
34 GURL /* origin */,
35 bool /* user_gesture */)
37 // Renderer request to browser for canceling a previous permission request.
38 IPC_MESSAGE_ROUTED2(MidiHostMsg_CancelSysExPermissionRequest,
39 int /* bridge_id */,
40 GURL /* GURL of the frame */)
42 // Messages sent from the browser to the renderer.
44 IPC_MESSAGE_ROUTED2(MidiMsg_SysExPermissionApproved,
45 int /* client id */,
46 bool /* is_allowed */)
48 // Messages for IPC between MidiMessageFilter and MidiHost.
50 // Renderer request to browser for access to MIDI services.
51 IPC_MESSAGE_CONTROL1(MidiHostMsg_StartSession,
52 int /* client id */)
54 IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData,
55 uint32 /* port */,
56 std::vector<uint8> /* data */,
57 double /* timestamp */)
59 // Messages sent from the browser to the renderer.
61 IPC_MESSAGE_CONTROL4(MidiMsg_SessionStarted,
62 int /* client id */,
63 media::MidiResult /* result */,
64 media::MidiPortInfoList /* input ports */,
65 media::MidiPortInfoList /* output ports */)
67 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived,
68 uint32 /* port */,
69 std::vector<uint8> /* data */,
70 double /* timestamp */)
72 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData,
73 uint32 /* bytes sent */)