| 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_type) | 22 IPC_STRUCT_TRAITS_MEMBER(audio_type) |
| 23 IPC_STRUCT_TRAITS_MEMBER(audio_device_id) |
| 23 IPC_STRUCT_TRAITS_MEMBER(video_type) | 24 IPC_STRUCT_TRAITS_MEMBER(video_type) |
| 25 IPC_STRUCT_TRAITS_MEMBER(video_device_id) |
| 24 IPC_STRUCT_TRAITS_END() | 26 IPC_STRUCT_TRAITS_END() |
| 25 | 27 |
| 26 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamDeviceInfo) | 28 IPC_STRUCT_TRAITS_BEGIN(media_stream::StreamDeviceInfo) |
| 27 IPC_STRUCT_TRAITS_MEMBER(stream_type) | 29 IPC_STRUCT_TRAITS_MEMBER(stream_type) |
| 28 IPC_STRUCT_TRAITS_MEMBER(name) | 30 IPC_STRUCT_TRAITS_MEMBER(name) |
| 29 IPC_STRUCT_TRAITS_MEMBER(device_id) | 31 IPC_STRUCT_TRAITS_MEMBER(device_id) |
| 30 IPC_STRUCT_TRAITS_MEMBER(in_use) | 32 IPC_STRUCT_TRAITS_MEMBER(in_use) |
| 31 IPC_STRUCT_TRAITS_MEMBER(session_id) | 33 IPC_STRUCT_TRAITS_MEMBER(session_id) |
| 32 IPC_STRUCT_TRAITS_END() | 34 IPC_STRUCT_TRAITS_END() |
| 33 | 35 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 80 |
| 79 // Messages sent from the renderer to the browser. | 81 // Messages sent from the renderer to the browser. |
| 80 | 82 |
| 81 // Request a new media stream. | 83 // Request a new media stream. |
| 82 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_GenerateStream, | 84 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_GenerateStream, |
| 83 int /* render view id */, | 85 int /* render view id */, |
| 84 int /* request id */, | 86 int /* request id */, |
| 85 media_stream::StreamOptions /* components */, | 87 media_stream::StreamOptions /* components */, |
| 86 GURL /* security origin */) | 88 GURL /* security origin */) |
| 87 | 89 |
| 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. | 90 // Request to cancel the request for a new media stream. |
| 97 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelGenerateStream, | 91 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelGenerateStream, |
| 98 int /* render view id */, | 92 int /* render view id */, |
| 99 int /* request id */) | 93 int /* request id */) |
| 100 | 94 |
| 101 // Request to stop streaming from the media stream. | 95 // Request to stop streaming from the media stream. |
| 102 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopGeneratedStream, | 96 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopGeneratedStream, |
| 103 int /* render view id */, | 97 int /* render view id */, |
| 104 std::string /* label */) | 98 std::string /* label */) |
| 105 | 99 |
| 106 // Request to enumerate devices. | 100 // Request to enumerate devices. |
| 107 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices, | 101 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices, |
| 108 int /* render view id */, | 102 int /* render view id */, |
| 109 int /* request id */, | 103 int /* request id */, |
| 110 media_stream::MediaStreamType /* type */, | 104 media_stream::MediaStreamType /* type */, |
| 111 GURL /* security origin */) | 105 GURL /* security origin */) |
| 112 | 106 |
| 113 // Request to open the device. | 107 // Request to open the device. |
| 114 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_OpenDevice, | 108 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_OpenDevice, |
| 115 int /* render view id */, | 109 int /* render view id */, |
| 116 int /* request id */, | 110 int /* request id */, |
| 117 std::string /* device_id */, | 111 std::string /* device_id */, |
| 118 media_stream::MediaStreamType /* type */, | 112 media_stream::MediaStreamType /* type */, |
| 119 GURL /* security origin */) | 113 GURL /* security origin */) |
| OLD | NEW |