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

Side by Side Diff: content/common/media/midi_messages.h

Issue 662233002: Web MIDI: make MidiManagerMac notify device connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: it->second Created 5 years, 10 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
« no previous file with comments | « content/browser/media/midi_host.cc ('k') | content/renderer/media/midi_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ENUM_TRAITS_MAX_VALUE(media::MidiPortState,
21 media::MIDI_PORT_STATE_LAST)
22
20 IPC_STRUCT_TRAITS_BEGIN(media::MidiPortInfo) 23 IPC_STRUCT_TRAITS_BEGIN(media::MidiPortInfo)
21 IPC_STRUCT_TRAITS_MEMBER(id) 24 IPC_STRUCT_TRAITS_MEMBER(id)
22 IPC_STRUCT_TRAITS_MEMBER(manufacturer) 25 IPC_STRUCT_TRAITS_MEMBER(manufacturer)
23 IPC_STRUCT_TRAITS_MEMBER(name) 26 IPC_STRUCT_TRAITS_MEMBER(name)
24 IPC_STRUCT_TRAITS_MEMBER(version) 27 IPC_STRUCT_TRAITS_MEMBER(version)
28 IPC_STRUCT_TRAITS_MEMBER(state)
25 IPC_STRUCT_TRAITS_END() 29 IPC_STRUCT_TRAITS_END()
26 30
27 IPC_ENUM_TRAITS_MAX_VALUE(media::MidiResult, media::MIDI_RESULT_LAST) 31 IPC_ENUM_TRAITS_MAX_VALUE(media::MidiResult, media::MIDI_RESULT_LAST)
28 32
29 // Messages for IPC between MidiMessageFilter and MidiHost. 33 // Messages for IPC between MidiMessageFilter and MidiHost.
30 34
31 // Renderer request to browser for access to MIDI services. 35 // Renderer request to browser for access to MIDI services.
32 IPC_MESSAGE_CONTROL0(MidiHostMsg_StartSession) 36 IPC_MESSAGE_CONTROL0(MidiHostMsg_StartSession)
33 37
34 IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData, 38 IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData,
35 uint32 /* port */, 39 uint32 /* port */,
36 std::vector<uint8> /* data */, 40 std::vector<uint8> /* data */,
37 double /* timestamp */) 41 double /* timestamp */)
38 42
39 IPC_MESSAGE_CONTROL0(MidiHostMsg_EndSession) 43 IPC_MESSAGE_CONTROL0(MidiHostMsg_EndSession)
40 44
41 // Messages sent from the browser to the renderer. 45 // Messages sent from the browser to the renderer.
42 46
43 IPC_MESSAGE_CONTROL1(MidiMsg_AddInputPort, 47 IPC_MESSAGE_CONTROL1(MidiMsg_AddInputPort,
44 media::MidiPortInfo /* input port */) 48 media::MidiPortInfo /* input port */)
45 49
46 IPC_MESSAGE_CONTROL1(MidiMsg_AddOutputPort, 50 IPC_MESSAGE_CONTROL1(MidiMsg_AddOutputPort,
47 media::MidiPortInfo /* output port */) 51 media::MidiPortInfo /* output port */)
48 52
53 IPC_MESSAGE_CONTROL2(MidiMsg_SetInputPortState,
54 uint32 /* port */,
55 media::MidiPortState /* state */)
56
57 IPC_MESSAGE_CONTROL2(MidiMsg_SetOutputPortState,
58 uint32 /* port */,
59 media::MidiPortState /* state */)
60
49 IPC_MESSAGE_CONTROL1(MidiMsg_SessionStarted, 61 IPC_MESSAGE_CONTROL1(MidiMsg_SessionStarted,
50 media::MidiResult /* result */) 62 media::MidiResult /* result */)
51 63
52 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived, 64 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived,
53 uint32 /* port */, 65 uint32 /* port */,
54 std::vector<uint8> /* data */, 66 std::vector<uint8> /* data */,
55 double /* timestamp */) 67 double /* timestamp */)
56 68
57 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData, 69 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData,
58 uint32 /* bytes sent */) 70 uint32 /* bytes sent */)
OLDNEW
« no previous file with comments | « content/browser/media/midi_host.cc ('k') | content/renderer/media/midi_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698