Chromium Code Reviews| 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 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 | 19 |
| 20 // Types of media streams. | 20 // Types of media streams. |
| 21 enum MediaStreamType { | 21 enum MediaStreamType { |
| 22 MEDIA_NO_SERVICE = 0, | 22 MEDIA_NO_SERVICE = 0, |
| 23 | 23 |
| 24 // A device provided by the operating system (e.g., webcam input). | 24 // A device provided by the operating system (e.g., webcam input). |
| 25 MEDIA_DEVICE_AUDIO_CAPTURE, | 25 MEDIA_DEVICE_AUDIO_CAPTURE, |
| 26 MEDIA_DEVICE_VIDEO_CAPTURE, | 26 MEDIA_DEVICE_VIDEO_CAPTURE, |
| 27 | 27 |
| 28 // Mirroring of a browser tab. | 28 // Mirroring of a browser tab. |
| 29 // | |
| 30 // TODO(serygeu): Remove these values and use MEDIA_DESKTOP_VIDEO_CAPTURE and | |
|
tommi (sloooow) - chröme
2013/11/26 14:44:21
did you mean to remove this todo?
perkj_chrome
2013/11/27 13:41:34
Yes, I was asked by miu since I changed tab_captur
| |
| 31 // MEDIA_DESKTOP_AUDIO_CAPTURE. | |
| 32 MEDIA_TAB_AUDIO_CAPTURE, | 29 MEDIA_TAB_AUDIO_CAPTURE, |
| 33 MEDIA_TAB_VIDEO_CAPTURE, | 30 MEDIA_TAB_VIDEO_CAPTURE, |
| 34 | 31 |
| 35 // Desktop media sources. | 32 // Desktop media sources. |
| 36 MEDIA_DESKTOP_VIDEO_CAPTURE, | 33 MEDIA_DESKTOP_VIDEO_CAPTURE, |
| 37 | 34 |
| 38 // Capture system audio (post-mix loopback stream). | 35 // Capture system audio (post-mix loopback stream). |
| 39 // | 36 // |
| 40 // TODO(sergeyu): Replace with MEDIA_DESKTOP_AUDIO_CAPTURE. | 37 // TODO(sergeyu): Replace with MEDIA_DESKTOP_AUDIO_CAPTURE. |
| 41 MEDIA_LOOPBACK_AUDIO_CAPTURE, | 38 MEDIA_LOOPBACK_AUDIO_CAPTURE, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 // media_stream_options.h no longer depends on this file. | 156 // media_stream_options.h no longer depends on this file. |
| 160 // TODO(vrk,justinlin,wjia): Figure out a way to share this code cleanly between | 157 // TODO(vrk,justinlin,wjia): Figure out a way to share this code cleanly between |
| 161 // vanilla WebRTC, Tab Capture, and Pepper Video Capture. Right now there is | 158 // vanilla WebRTC, Tab Capture, and Pepper Video Capture. Right now there is |
| 162 // Tab-only stuff and Pepper-only stuff being passed around to all clients, | 159 // Tab-only stuff and Pepper-only stuff being passed around to all clients, |
| 163 // which is icky. | 160 // which is icky. |
| 164 struct CONTENT_EXPORT MediaStreamRequest { | 161 struct CONTENT_EXPORT MediaStreamRequest { |
| 165 MediaStreamRequest( | 162 MediaStreamRequest( |
| 166 int render_process_id, | 163 int render_process_id, |
| 167 int render_view_id, | 164 int render_view_id, |
| 168 int page_request_id, | 165 int page_request_id, |
| 169 const std::string& tab_capture_device_id, | |
| 170 const GURL& security_origin, | 166 const GURL& security_origin, |
| 171 MediaStreamRequestType request_type, | 167 MediaStreamRequestType request_type, |
| 172 const std::string& requested_audio_device_id, | 168 const std::string& requested_audio_device_id, |
| 173 const std::string& requested_video_device_id, | 169 const std::string& requested_video_device_id, |
| 174 MediaStreamType audio_type, | 170 MediaStreamType audio_type, |
| 175 MediaStreamType video_type); | 171 MediaStreamType video_type); |
| 176 | 172 |
| 177 ~MediaStreamRequest(); | 173 ~MediaStreamRequest(); |
| 178 | 174 |
| 179 // This is the render process id for the renderer associated with generating | 175 // This is the render process id for the renderer associated with generating |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 }; | 222 }; |
| 227 | 223 |
| 228 // Callback used return results of media access requests. | 224 // Callback used return results of media access requests. |
| 229 typedef base::Callback<void( | 225 typedef base::Callback<void( |
| 230 const MediaStreamDevices& devices, | 226 const MediaStreamDevices& devices, |
| 231 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; | 227 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; |
| 232 | 228 |
| 233 } // namespace content | 229 } // namespace content |
| 234 | 230 |
| 235 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 231 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
| OLD | NEW |