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 #include "content/public/common/media_stream_request.h" | 5 #include "content/public/common/media_stream_request.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 bool IsAudioInputMediaType(MediaStreamType type) { | 12 bool IsAudioInputMediaType(MediaStreamType type) { |
13 return (type == MEDIA_DEVICE_AUDIO_CAPTURE || | 13 return (type == MEDIA_DEVICE_AUDIO_CAPTURE || |
14 type == content::MEDIA_TAB_AUDIO_CAPTURE || | 14 type == content::MEDIA_TAB_AUDIO_CAPTURE || |
15 type == content::MEDIA_DESKTOP_AUDIO_CAPTURE); | 15 type == content::MEDIA_DESKTOP_AUDIO_CAPTURE); |
16 } | 16 } |
17 | 17 |
18 bool IsVideoMediaType(MediaStreamType type) { | 18 bool IsVideoMediaType(MediaStreamType type) { |
19 return (type == MEDIA_DEVICE_VIDEO_CAPTURE || | 19 return (type == MEDIA_DEVICE_VIDEO_CAPTURE || |
20 type == content::MEDIA_TAB_VIDEO_CAPTURE || | 20 type == content::MEDIA_TAB_VIDEO_CAPTURE || |
21 type == content::MEDIA_DESKTOP_VIDEO_CAPTURE); | 21 type == content::MEDIA_DESKTOP_VIDEO_CAPTURE); |
22 } | 22 } |
23 | 23 |
| 24 bool IsContentCaptureMediaType(MediaStreamType type) { |
| 25 return (type == content::MEDIA_TAB_AUDIO_CAPTURE || |
| 26 type == content::MEDIA_TAB_VIDEO_CAPTURE || |
| 27 type == content::MEDIA_DESKTOP_AUDIO_CAPTURE || |
| 28 type == content::MEDIA_DESKTOP_VIDEO_CAPTURE); |
| 29 } |
| 30 |
24 MediaStreamDevice::MediaStreamDevice() | 31 MediaStreamDevice::MediaStreamDevice() |
25 : type(MEDIA_NO_SERVICE), | 32 : type(MEDIA_NO_SERVICE), |
26 video_facing(MEDIA_VIDEO_FACING_NONE) { | 33 video_facing(MEDIA_VIDEO_FACING_NONE) { |
27 } | 34 } |
28 | 35 |
29 MediaStreamDevice::MediaStreamDevice( | 36 MediaStreamDevice::MediaStreamDevice( |
30 MediaStreamType type, | 37 MediaStreamType type, |
31 const std::string& id, | 38 const std::string& id, |
32 const std::string& name) | 39 const std::string& name) |
33 : type(type), | 40 : type(type), |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 requested_audio_device_id(requested_audio_device_id), | 125 requested_audio_device_id(requested_audio_device_id), |
119 requested_video_device_id(requested_video_device_id), | 126 requested_video_device_id(requested_video_device_id), |
120 audio_type(audio_type), | 127 audio_type(audio_type), |
121 video_type(video_type), | 128 video_type(video_type), |
122 all_ancestors_have_same_origin(false) { | 129 all_ancestors_have_same_origin(false) { |
123 } | 130 } |
124 | 131 |
125 MediaStreamRequest::~MediaStreamRequest() {} | 132 MediaStreamRequest::~MediaStreamRequest() {} |
126 | 133 |
127 } // namespace content | 134 } // namespace content |
OLD | NEW |