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 // TODO(toyoshim): Mojofication is working in progress. Until the work is |
| 9 // finished, this file temporarily depends on midi_service.mojom.h. |
| 10 // Once the migration is finished, this file will be removed. |
| 11 // http://crbug.com/582327 |
| 12 |
8 #include <stdint.h> | 13 #include <stdint.h> |
9 | 14 |
10 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
11 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
12 #include "ipc/param_traits_macros.h" | 17 #include "ipc/param_traits_macros.h" |
13 #include "media/midi/midi_port_info.h" | 18 #include "media/midi/midi_port_info.h" |
14 #include "media/midi/result.h" | 19 #include "media/midi/midi_service.mojom.h" |
15 #include "url/gurl.h" | 20 #include "url/gurl.h" |
16 | 21 |
17 #undef IPC_MESSAGE_EXPORT | 22 #undef IPC_MESSAGE_EXPORT |
18 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 23 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
19 #define IPC_MESSAGE_START MidiMsgStart | 24 #define IPC_MESSAGE_START MidiMsgStart |
20 | 25 |
21 IPC_ENUM_TRAITS_MAX_VALUE(midi::MidiPortState, | 26 IPC_ENUM_TRAITS_MAX_VALUE(midi::MidiPortState, |
22 midi::MIDI_PORT_STATE_LAST) | 27 midi::MIDI_PORT_STATE_LAST) |
23 | 28 |
24 IPC_STRUCT_TRAITS_BEGIN(midi::MidiPortInfo) | 29 IPC_STRUCT_TRAITS_BEGIN(midi::MidiPortInfo) |
25 IPC_STRUCT_TRAITS_MEMBER(id) | 30 IPC_STRUCT_TRAITS_MEMBER(id) |
26 IPC_STRUCT_TRAITS_MEMBER(manufacturer) | 31 IPC_STRUCT_TRAITS_MEMBER(manufacturer) |
27 IPC_STRUCT_TRAITS_MEMBER(name) | 32 IPC_STRUCT_TRAITS_MEMBER(name) |
28 IPC_STRUCT_TRAITS_MEMBER(version) | 33 IPC_STRUCT_TRAITS_MEMBER(version) |
29 IPC_STRUCT_TRAITS_MEMBER(state) | 34 IPC_STRUCT_TRAITS_MEMBER(state) |
30 IPC_STRUCT_TRAITS_END() | 35 IPC_STRUCT_TRAITS_END() |
31 | 36 |
32 IPC_ENUM_TRAITS_MAX_VALUE(midi::Result, midi::Result::MAX) | 37 IPC_ENUM_TRAITS_MAX_VALUE(midi::mojom::Result, midi::mojom::Result::MAX) |
33 | 38 |
34 // Messages for IPC between MidiMessageFilter and MidiHost. | 39 // Messages for IPC between MidiMessageFilter and MidiHost. |
35 | 40 |
36 // Renderer request to browser for access to MIDI services. | 41 // Renderer request to browser for access to MIDI services. |
37 IPC_MESSAGE_CONTROL0(MidiHostMsg_StartSession) | 42 IPC_MESSAGE_CONTROL0(MidiHostMsg_StartSession) |
38 | 43 |
39 IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData, | 44 IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData, |
40 uint32_t /* port */, | 45 uint32_t /* port */, |
41 std::vector<uint8_t> /* data */, | 46 std::vector<uint8_t> /* data */, |
42 double /* timestamp */) | 47 double /* timestamp */) |
43 | 48 |
44 IPC_MESSAGE_CONTROL0(MidiHostMsg_EndSession) | 49 IPC_MESSAGE_CONTROL0(MidiHostMsg_EndSession) |
45 | 50 |
46 // Messages sent from the browser to the renderer. | 51 // Messages sent from the browser to the renderer. |
47 | 52 |
48 IPC_MESSAGE_CONTROL1(MidiMsg_AddInputPort, | 53 IPC_MESSAGE_CONTROL1(MidiMsg_AddInputPort, |
49 midi::MidiPortInfo /* input port */) | 54 midi::MidiPortInfo /* input port */) |
50 | 55 |
51 IPC_MESSAGE_CONTROL1(MidiMsg_AddOutputPort, | 56 IPC_MESSAGE_CONTROL1(MidiMsg_AddOutputPort, |
52 midi::MidiPortInfo /* output port */) | 57 midi::MidiPortInfo /* output port */) |
53 | 58 |
54 IPC_MESSAGE_CONTROL2(MidiMsg_SetInputPortState, | 59 IPC_MESSAGE_CONTROL2(MidiMsg_SetInputPortState, |
55 uint32_t /* port */, | 60 uint32_t /* port */, |
56 midi::MidiPortState /* state */) | 61 midi::MidiPortState /* state */) |
57 | 62 |
58 IPC_MESSAGE_CONTROL2(MidiMsg_SetOutputPortState, | 63 IPC_MESSAGE_CONTROL2(MidiMsg_SetOutputPortState, |
59 uint32_t /* port */, | 64 uint32_t /* port */, |
60 midi::MidiPortState /* state */) | 65 midi::MidiPortState /* state */) |
61 | 66 |
62 IPC_MESSAGE_CONTROL1(MidiMsg_SessionStarted, midi::Result /* result */) | 67 IPC_MESSAGE_CONTROL1(MidiMsg_SessionStarted, midi::mojom::Result /* result */) |
63 | 68 |
64 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived, | 69 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived, |
65 uint32_t /* port */, | 70 uint32_t /* port */, |
66 std::vector<uint8_t> /* data */, | 71 std::vector<uint8_t> /* data */, |
67 double /* timestamp */) | 72 double /* timestamp */) |
68 | 73 |
69 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData, uint32_t /* bytes sent */) | 74 IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData, uint32_t /* bytes sent */) |
OLD | NEW |