OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 the media streaming. | 5 // IPC messages for the media streaming. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/common/media/media_stream_options.h" | 11 #include "content/common/media/media_stream_options.h" |
12 #include "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
14 | 14 |
15 #undef IPC_MESSAGE_EXPORT | 15 #undef IPC_MESSAGE_EXPORT |
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
17 #define IPC_MESSAGE_START MediaStreamMsgStart | 17 #define IPC_MESSAGE_START MediaStreamMsgStart |
18 | 18 |
19 IPC_ENUM_TRAITS(media_stream::MediaStreamType) | 19 IPC_ENUM_TRAITS(media_stream::MediaStreamType) |
20 | 20 |
21 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamOptions) | 21 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamOptions) |
22 IPC_STRUCT_TRAITS_MEMBER(audio) | 22 IPC_STRUCT_TRAITS_MEMBER(audio_type) |
23 IPC_STRUCT_TRAITS_MEMBER(video) | 23 IPC_STRUCT_TRAITS_MEMBER(video_type) |
24 IPC_STRUCT_TRAITS_END() | 24 IPC_STRUCT_TRAITS_END() |
25 | 25 |
26 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamDeviceInfo) | 26 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamDeviceInfo) |
27 IPC_STRUCT_TRAITS_MEMBER(stream_type) | 27 IPC_STRUCT_TRAITS_MEMBER(stream_type) |
28 IPC_STRUCT_TRAITS_MEMBER(name) | 28 IPC_STRUCT_TRAITS_MEMBER(name) |
29 IPC_STRUCT_TRAITS_MEMBER(device_id) | 29 IPC_STRUCT_TRAITS_MEMBER(device_id) |
30 IPC_STRUCT_TRAITS_MEMBER(in_use) | 30 IPC_STRUCT_TRAITS_MEMBER(in_use) |
31 IPC_STRUCT_TRAITS_MEMBER(session_id) | 31 IPC_STRUCT_TRAITS_MEMBER(session_id) |
32 IPC_STRUCT_TRAITS_END() | 32 IPC_STRUCT_TRAITS_END() |
33 | 33 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // The browser has failed to open a device. | 75 // The browser has failed to open a device. |
76 IPC_MESSAGE_ROUTED1(MediaStreamMsg_DeviceOpenFailed, | 76 IPC_MESSAGE_ROUTED1(MediaStreamMsg_DeviceOpenFailed, |
77 int /* request id */) | 77 int /* request id */) |
78 | 78 |
79 // Messages sent from the renderer to the browser. | 79 // Messages sent from the renderer to the browser. |
80 | 80 |
81 // Request a new media stream. | 81 // Request a new media stream. |
82 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_GenerateStream, | 82 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_GenerateStream, |
83 int /* render view id */, | 83 int /* render view id */, |
84 int /* request id */, | 84 int /* request id */, |
85 media_stream::StreamOptions /* options */, | 85 media_stream::StreamOptions /* components */, |
86 GURL /* security origin */) | 86 GURL /* security origin */) |
87 | 87 |
88 // Request to cancel the request for a new media stream. | 88 // Request a new media stream for a specific device. |
| 89 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_GenerateStreamForDevice, |
| 90 int /* render view id */, |
| 91 int /* request id */, |
| 92 media_stream::StreamOptions /* components */, |
| 93 std::string /* device_id */, |
| 94 GURL /* security origin */) |
| 95 |
| 96 // Request to cancel the request for a new media stream. |
89 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelGenerateStream, | 97 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelGenerateStream, |
90 int /* render view id */, | 98 int /* render view id */, |
91 int /* request id */) | 99 int /* request id */) |
92 | 100 |
93 // Request to stop streaming from the media stream. | 101 // Request to stop streaming from the media stream. |
94 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopGeneratedStream, | 102 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopGeneratedStream, |
95 int /* render view id */, | 103 int /* render view id */, |
96 std::string /* label */) | 104 std::string /* label */) |
97 | 105 |
98 // Request to enumerate devices. | 106 // Request to enumerate devices. |
99 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices, | 107 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices, |
100 int /* render view id */, | 108 int /* render view id */, |
101 int /* request id */, | 109 int /* request id */, |
102 media_stream::MediaStreamType /* type */, | 110 media_stream::MediaStreamType /* type */, |
103 GURL /* security origin */) | 111 GURL /* security origin */) |
104 | 112 |
105 // Request to open the device. | 113 // Request to open the device. |
106 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_OpenDevice, | 114 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_OpenDevice, |
107 int /* render view id */, | 115 int /* render view id */, |
108 int /* request id */, | 116 int /* request id */, |
109 std::string /* device_id */, | 117 std::string /* device_id */, |
110 media_stream::MediaStreamType /* type */, | 118 media_stream::MediaStreamType /* type */, |
111 GURL /* security origin */) | 119 GURL /* security origin */) |
OLD | NEW |