| 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 == MEDIA_TAB_AUDIO_CAPTURE || |
| 15 type == content::MEDIA_DESKTOP_AUDIO_CAPTURE); | 15 type == 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 == MEDIA_TAB_VIDEO_CAPTURE || |
| 21 type == content::MEDIA_DESKTOP_VIDEO_CAPTURE); | 21 type == MEDIA_DESKTOP_VIDEO_CAPTURE); |
| 22 } |
| 23 |
| 24 bool IsScreenCaptureMediaType(MediaStreamType type) { |
| 25 return (type == MEDIA_TAB_AUDIO_CAPTURE || |
| 26 type == MEDIA_TAB_VIDEO_CAPTURE || |
| 27 type == MEDIA_DESKTOP_AUDIO_CAPTURE || |
| 28 type == MEDIA_DESKTOP_VIDEO_CAPTURE); |
| 22 } | 29 } |
| 23 | 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, |
| (...skipping 94 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 |