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 "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
13 #include "ipc/ipc_platform_file.h" | 13 #include "ipc/ipc_platform_file.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 MediaStreamMsgStart | 18 #define IPC_MESSAGE_START MediaStreamMsgStart |
19 | 19 |
20 IPC_ENUM_TRAITS_MAX_VALUE(content::MediaStreamType, | 20 IPC_ENUM_TRAITS_MAX_VALUE(content::MediaStreamType, |
21 content::NUM_MEDIA_TYPES - 1) | 21 content::NUM_MEDIA_TYPES - 1) |
22 | 22 |
23 IPC_ENUM_TRAITS_MAX_VALUE(content::VideoFacingMode, | 23 IPC_ENUM_TRAITS_MAX_VALUE(content::VideoFacingMode, |
24 content::NUM_MEDIA_VIDEO_FACING_MODE - 1) | 24 content::NUM_MEDIA_VIDEO_FACING_MODE - 1) |
25 | 25 |
| 26 IPC_ENUM_TRAITS_MAX_VALUE(content::MediaStreamRequestResult, |
| 27 content::NUM_MEDIA_REQUEST_RESULTS - 1) |
| 28 |
26 IPC_STRUCT_TRAITS_BEGIN(content::StreamOptions::Constraint) | 29 IPC_STRUCT_TRAITS_BEGIN(content::StreamOptions::Constraint) |
27 IPC_STRUCT_TRAITS_MEMBER(name) | 30 IPC_STRUCT_TRAITS_MEMBER(name) |
28 IPC_STRUCT_TRAITS_MEMBER(value) | 31 IPC_STRUCT_TRAITS_MEMBER(value) |
29 IPC_STRUCT_TRAITS_END() | 32 IPC_STRUCT_TRAITS_END() |
30 | 33 |
31 IPC_STRUCT_TRAITS_BEGIN(content::StreamOptions) | 34 IPC_STRUCT_TRAITS_BEGIN(content::StreamOptions) |
32 IPC_STRUCT_TRAITS_MEMBER(audio_requested) | 35 IPC_STRUCT_TRAITS_MEMBER(audio_requested) |
33 IPC_STRUCT_TRAITS_MEMBER(mandatory_audio) | 36 IPC_STRUCT_TRAITS_MEMBER(mandatory_audio) |
34 IPC_STRUCT_TRAITS_MEMBER(optional_audio) | 37 IPC_STRUCT_TRAITS_MEMBER(optional_audio) |
35 IPC_STRUCT_TRAITS_MEMBER(video_requested) | 38 IPC_STRUCT_TRAITS_MEMBER(video_requested) |
(...skipping 20 matching lines...) Expand all Loading... |
56 // Message sent from the browser to the renderer | 59 // Message sent from the browser to the renderer |
57 | 60 |
58 // The browser has generated a stream successfully. | 61 // The browser has generated a stream successfully. |
59 IPC_MESSAGE_ROUTED4(MediaStreamMsg_StreamGenerated, | 62 IPC_MESSAGE_ROUTED4(MediaStreamMsg_StreamGenerated, |
60 int /* request id */, | 63 int /* request id */, |
61 std::string /* label */, | 64 std::string /* label */, |
62 content::StreamDeviceInfoArray /* audio_device_list */, | 65 content::StreamDeviceInfoArray /* audio_device_list */, |
63 content::StreamDeviceInfoArray /* video_device_list */) | 66 content::StreamDeviceInfoArray /* video_device_list */) |
64 | 67 |
65 // The browser has failed to generate a stream. | 68 // The browser has failed to generate a stream. |
66 IPC_MESSAGE_ROUTED1(MediaStreamMsg_StreamGenerationFailed, | 69 IPC_MESSAGE_ROUTED2(MediaStreamMsg_StreamGenerationFailed, |
67 int /* request id */) | 70 int /* request id */, |
| 71 content::MediaStreamRequestResult /* result */) |
68 | 72 |
69 // The browser reports that a media device has been stopped. Stopping was | 73 // The browser reports that a media device has been stopped. Stopping was |
70 // triggered from the browser process. | 74 // triggered from the browser process. |
71 IPC_MESSAGE_ROUTED2(MediaStreamMsg_DeviceStopped, | 75 IPC_MESSAGE_ROUTED2(MediaStreamMsg_DeviceStopped, |
72 std::string /* label */, | 76 std::string /* label */, |
73 content::StreamDeviceInfo /* the device */) | 77 content::StreamDeviceInfo /* the device */) |
74 | 78 |
75 // The browser has enumerated devices. If no devices are found | 79 // The browser has enumerated devices. If no devices are found |
76 // |device_list| is empty. | 80 // |device_list| is empty. |
77 // Used by Pepper. | 81 // Used by Pepper. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 int /* render view id */, | 154 int /* render view id */, |
151 int /* request id */, | 155 int /* request id */, |
152 std::string /* device_id */, | 156 std::string /* device_id */, |
153 content::MediaStreamType /* type */, | 157 content::MediaStreamType /* type */, |
154 GURL /* security origin */) | 158 GURL /* security origin */) |
155 | 159 |
156 // Request to close a device. | 160 // Request to close a device. |
157 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CloseDevice, | 161 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CloseDevice, |
158 int /* render view id */, | 162 int /* render view id */, |
159 std::string /*label*/) | 163 std::string /*label*/) |
OLD | NEW |