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); | |
Sergey Ulanov
2016/08/01 18:20:36
don't need to specify namespace, because this code
braveyao
2016/08/03 00:23:47
Done.
| |
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 video_type(video_type), | 133 video_type(video_type), |
127 all_ancestors_have_same_origin(false) { | 134 all_ancestors_have_same_origin(false) { |
128 } | 135 } |
129 | 136 |
130 MediaStreamRequest::MediaStreamRequest(const MediaStreamRequest& other) = | 137 MediaStreamRequest::MediaStreamRequest(const MediaStreamRequest& other) = |
131 default; | 138 default; |
132 | 139 |
133 MediaStreamRequest::~MediaStreamRequest() {} | 140 MediaStreamRequest::~MediaStreamRequest() {} |
134 | 141 |
135 } // namespace content | 142 } // namespace content |
OLD | NEW |