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
3 // found in the LICENSE file.
5 #include "content/public/common/media_stream_request.h"
9 bool IsAudioMediaType(MediaStreamDeviceType type
) {
10 return (type
== content::MEDIA_DEVICE_AUDIO_CAPTURE
||
11 type
== content::MEDIA_TAB_AUDIO_CAPTURE
);
14 bool IsVideoMediaType(MediaStreamDeviceType type
) {
15 return (type
== content::MEDIA_DEVICE_VIDEO_CAPTURE
||
16 type
== content::MEDIA_TAB_VIDEO_CAPTURE
);
19 MediaStreamDevice::MediaStreamDevice(
20 MediaStreamDeviceType type
,
21 const std::string
& device_id
,
22 const std::string
& name
)
28 MediaStreamDevice::~MediaStreamDevice() {}
30 MediaStreamRequest::MediaStreamRequest(
31 int render_process_id
,
33 const GURL
& security_origin
)
34 : render_process_id(render_process_id
),
35 render_view_id(render_view_id
),
36 security_origin(security_origin
) {
39 MediaStreamRequest::~MediaStreamRequest() {
40 for (MediaStreamDeviceMap::iterator iter
= devices
.begin();
41 iter
!= devices
.end();
48 } // namespace content