| 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/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(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) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 IPC_MESSAGE_ROUTED1(MediaStreamMsg_DeviceOpenFailed, | 95 IPC_MESSAGE_ROUTED1(MediaStreamMsg_DeviceOpenFailed, |
| 96 int /* request id */) | 96 int /* request id */) |
| 97 | 97 |
| 98 // Messages sent from the renderer to the browser. | 98 // Messages sent from the renderer to the browser. |
| 99 | 99 |
| 100 // Request a new media stream. | 100 // Request a new media stream. |
| 101 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_GenerateStream, | 101 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_GenerateStream, |
| 102 int /* render frame id */, | 102 int /* render frame id */, |
| 103 int /* request id */, | 103 int /* request id */, |
| 104 content::StreamControls /* controls */, | 104 content::StreamControls /* controls */, |
| 105 GURL /* security origin */, | 105 url::Origin /* security origin */, |
| 106 bool /* user_gesture */) | 106 bool /* user_gesture */) |
| 107 | 107 |
| 108 // Request to cancel the request for a new media stream. | 108 // Request to cancel the request for a new media stream. |
| 109 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelGenerateStream, | 109 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelGenerateStream, |
| 110 int /* render frame id */, | 110 int /* render frame id */, |
| 111 int /* request id */) | 111 int /* request id */) |
| 112 | 112 |
| 113 // Request to close a device that has been opened by GenerateStream. | 113 // Request to close a device that has been opened by GenerateStream. |
| 114 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopStreamDevice, | 114 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_StopStreamDevice, |
| 115 int /* render frame id */, | 115 int /* render frame id */, |
| 116 std::string /*device_id*/) | 116 std::string /*device_id*/) |
| 117 | 117 |
| 118 // Request to enumerate devices. | 118 // Request to enumerate devices. |
| 119 // Used by Pepper and WebRTC. | 119 // Used by Pepper and WebRTC. |
| 120 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices, | 120 IPC_MESSAGE_CONTROL4(MediaStreamHostMsg_EnumerateDevices, |
| 121 int /* render frame id */, | 121 int /* render frame id */, |
| 122 int /* request id */, | 122 int /* request id */, |
| 123 content::MediaStreamType /* type */, | 123 content::MediaStreamType /* type */, |
| 124 GURL /* security origin */) | 124 url::Origin /* security origin */) |
| 125 | 125 |
| 126 // Request to stop enumerating devices. | 126 // Request to stop enumerating devices. |
| 127 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelEnumerateDevices, | 127 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CancelEnumerateDevices, |
| 128 int /* render frame id */, | 128 int /* render frame id */, |
| 129 int /* request id */) | 129 int /* request id */) |
| 130 | 130 |
| 131 // Request to open the device. | 131 // Request to open the device. |
| 132 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_OpenDevice, | 132 IPC_MESSAGE_CONTROL5(MediaStreamHostMsg_OpenDevice, |
| 133 int /* render frame id */, | 133 int /* render frame id */, |
| 134 int /* request id */, | 134 int /* request id */, |
| 135 std::string /* device_id */, | 135 std::string /* device_id */, |
| 136 content::MediaStreamType /* type */, | 136 content::MediaStreamType /* type */, |
| 137 GURL /* security origin */) | 137 url::Origin /* security origin */) |
| 138 | 138 |
| 139 // Request to close a device. | 139 // Request to close a device. |
| 140 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CloseDevice, | 140 IPC_MESSAGE_CONTROL2(MediaStreamHostMsg_CloseDevice, |
| 141 int /* render frame id */, | 141 int /* render frame id */, |
| 142 std::string /*label*/) | 142 std::string /*label*/) |
| OLD | NEW |