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 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 bool IsAudioMediaType(MediaStreamType type) { | 11 bool IsAudioMediaType(MediaStreamType type) { |
12 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE || | 12 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE || |
13 type == content::MEDIA_TAB_AUDIO_CAPTURE); | 13 type == content::MEDIA_TAB_AUDIO_CAPTURE); |
14 } | 14 } |
15 | 15 |
16 bool IsVideoMediaType(MediaStreamType type) { | 16 bool IsVideoMediaType(MediaStreamType type) { |
17 return (type == content::MEDIA_DEVICE_VIDEO_CAPTURE || | 17 return (type == content::MEDIA_DEVICE_VIDEO_CAPTURE || |
18 type == content::MEDIA_TAB_VIDEO_CAPTURE || | 18 type == content::MEDIA_TAB_VIDEO_CAPTURE || |
19 type == content::MEDIA_SCREEN_VIDEO_CAPTURE); | 19 type == content::MEDIA_SCREEN_VIDEO_CAPTURE || |
| 20 type == content::MEDIA_SCREEN_ENCODED_VIDEO_CAPTURE); |
20 } | 21 } |
21 | 22 |
22 MediaStreamDevice::MediaStreamDevice() : type(MEDIA_NO_SERVICE) {} | 23 MediaStreamDevice::MediaStreamDevice() : type(MEDIA_NO_SERVICE) {} |
23 | 24 |
24 MediaStreamDevice::MediaStreamDevice( | 25 MediaStreamDevice::MediaStreamDevice( |
25 MediaStreamType type, | 26 MediaStreamType type, |
26 const std::string& id, | 27 const std::string& id, |
27 const std::string& name) | 28 const std::string& name) |
28 : type(type), | 29 : type(type), |
29 id(id), | 30 id(id), |
(...skipping 30 matching lines...) Expand all Loading... |
60 security_origin(security_origin), | 61 security_origin(security_origin), |
61 request_type(request_type), | 62 request_type(request_type), |
62 requested_device_id(requested_device_id), | 63 requested_device_id(requested_device_id), |
63 audio_type(audio_type), | 64 audio_type(audio_type), |
64 video_type(video_type) { | 65 video_type(video_type) { |
65 } | 66 } |
66 | 67 |
67 MediaStreamRequest::~MediaStreamRequest() {} | 68 MediaStreamRequest::~MediaStreamRequest() {} |
68 | 69 |
69 } // namespace content | 70 } // namespace content |
OLD | NEW |