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/origin.h" | 14 #include "url/origin.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(media::VideoFacingMode, | 23 IPC_ENUM_TRAITS_MAX_VALUE(media::VideoFacingMode, |
24 media::NUM_MEDIA_VIDEO_FACING_MODE - 1) | 24 media::NUM_MEDIA_VIDEO_FACING_MODE - 1) |
25 | 25 |
26 IPC_ENUM_TRAITS_MAX_VALUE(content::MediaStreamRequestResult, | 26 IPC_ENUM_TRAITS_MAX_VALUE(content::MediaStreamRequestResult, |
27 content::NUM_MEDIA_REQUEST_RESULTS - 1) | 27 content::NUM_MEDIA_REQUEST_RESULTS - 1) |
28 | 28 |
| 29 IPC_ENUM_TRAITS_MAX_VALUE(content::VideoKind, content::NUM_VIDEO_KINDS - 1) |
| 30 |
29 IPC_STRUCT_TRAITS_BEGIN(content::TrackControls) | 31 IPC_STRUCT_TRAITS_BEGIN(content::TrackControls) |
30 IPC_STRUCT_TRAITS_MEMBER(requested) | 32 IPC_STRUCT_TRAITS_MEMBER(requested) |
31 IPC_STRUCT_TRAITS_MEMBER(stream_source) | 33 IPC_STRUCT_TRAITS_MEMBER(stream_source) |
32 IPC_STRUCT_TRAITS_MEMBER(device_id) | 34 IPC_STRUCT_TRAITS_MEMBER(device_id) |
33 IPC_STRUCT_TRAITS_END() | 35 IPC_STRUCT_TRAITS_END() |
34 | 36 |
35 IPC_STRUCT_TRAITS_BEGIN(content::StreamControls) | 37 IPC_STRUCT_TRAITS_BEGIN(content::StreamControls) |
36 IPC_STRUCT_TRAITS_MEMBER(audio) | 38 IPC_STRUCT_TRAITS_MEMBER(audio) |
37 IPC_STRUCT_TRAITS_MEMBER(video) | 39 IPC_STRUCT_TRAITS_MEMBER(video) |
38 IPC_STRUCT_TRAITS_MEMBER(hotword_enabled) | 40 IPC_STRUCT_TRAITS_MEMBER(hotword_enabled) |
39 IPC_STRUCT_TRAITS_MEMBER(disable_local_echo) | 41 IPC_STRUCT_TRAITS_MEMBER(disable_local_echo) |
| 42 IPC_STRUCT_TRAITS_MEMBER(video_kind) |
40 IPC_STRUCT_TRAITS_END() | 43 IPC_STRUCT_TRAITS_END() |
41 | 44 |
42 IPC_STRUCT_TRAITS_BEGIN(content::StreamDeviceInfo) | 45 IPC_STRUCT_TRAITS_BEGIN(content::StreamDeviceInfo) |
43 IPC_STRUCT_TRAITS_MEMBER(device.type) | 46 IPC_STRUCT_TRAITS_MEMBER(device.type) |
44 IPC_STRUCT_TRAITS_MEMBER(device.name) | 47 IPC_STRUCT_TRAITS_MEMBER(device.name) |
45 IPC_STRUCT_TRAITS_MEMBER(device.id) | 48 IPC_STRUCT_TRAITS_MEMBER(device.id) |
46 IPC_STRUCT_TRAITS_MEMBER(device.video_facing) | 49 IPC_STRUCT_TRAITS_MEMBER(device.video_facing) |
47 IPC_STRUCT_TRAITS_MEMBER(device.matched_output_device_id) | 50 IPC_STRUCT_TRAITS_MEMBER(device.matched_output_device_id) |
48 IPC_STRUCT_TRAITS_MEMBER(device.input.sample_rate) | 51 IPC_STRUCT_TRAITS_MEMBER(device.input.sample_rate) |
49 IPC_STRUCT_TRAITS_MEMBER(device.input.channel_layout) | 52 IPC_STRUCT_TRAITS_MEMBER(device.input.channel_layout) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // connected video sinks meet the requirement of output protection.). | 128 // connected video sinks meet the requirement of output protection.). |
126 // Note: the browser process only trusts the |is_sucure| value in this IPC | 129 // Note: the browser process only trusts the |is_sucure| value in this IPC |
127 // message if it's comimg from a trusted, whitelisted extension. Extensions run | 130 // message if it's comimg from a trusted, whitelisted extension. Extensions run |
128 // in separate render processes. So it shouldn't be possible, for example, for | 131 // in separate render processes. So it shouldn't be possible, for example, for |
129 // a user's visit to a malicious web page to compromise a render process running | 132 // a user's visit to a malicious web page to compromise a render process running |
130 // a trusted extension to make it report falsehood in this IPC message. | 133 // a trusted extension to make it report falsehood in this IPC message. |
131 IPC_MESSAGE_CONTROL3(MediaStreamHostMsg_SetCapturingLinkSecured, | 134 IPC_MESSAGE_CONTROL3(MediaStreamHostMsg_SetCapturingLinkSecured, |
132 int, /* session_id */ | 135 int, /* session_id */ |
133 content::MediaStreamType, /* type */ | 136 content::MediaStreamType, /* type */ |
134 bool /* is_secure */) | 137 bool /* is_secure */) |
OLD | NEW |