Loosen up heuristics for detecting account creation forms.
[chromium-blink-merge.git] / content / public / common / media_stream_request.cc
blob35fe2d8853f0b144d6abe235ecbd6167c161b6b5
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"
7 namespace content {
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)
23 : type(type),
24 device_id(device_id),
25 name(name) {
28 MediaStreamDevice::~MediaStreamDevice() {}
30 MediaStreamRequest::MediaStreamRequest(
31 int render_process_id,
32 int render_view_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();
42 ++iter) {
43 iter->second.clear();
45 devices.clear();
48 } // namespace content