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 namespace content { | 7 namespace content { |
8 | 8 |
| 9 const char kMediaStreamSource[] = "chromeMediaSource"; |
| 10 const char kMediaStreamSourceId[] = "chromeMediaSourceId"; |
| 11 |
9 bool IsAudioMediaType(MediaStreamDeviceType type) { | 12 bool IsAudioMediaType(MediaStreamDeviceType type) { |
10 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE || | 13 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE || |
11 type == content::MEDIA_TAB_AUDIO_CAPTURE); | 14 type == content::MEDIA_TAB_AUDIO_CAPTURE); |
12 } | 15 } |
13 | 16 |
14 bool IsVideoMediaType(MediaStreamDeviceType type) { | 17 bool IsVideoMediaType(MediaStreamDeviceType type) { |
15 return (type == content::MEDIA_DEVICE_VIDEO_CAPTURE || | 18 return (type == content::MEDIA_DEVICE_VIDEO_CAPTURE || |
16 type == content::MEDIA_TAB_VIDEO_CAPTURE); | 19 type == content::MEDIA_TAB_VIDEO_CAPTURE); |
17 } | 20 } |
18 | 21 |
(...skipping 20 matching lines...) Expand all Loading... |
39 MediaStreamRequest::~MediaStreamRequest() { | 42 MediaStreamRequest::~MediaStreamRequest() { |
40 for (MediaStreamDeviceMap::iterator iter = devices.begin(); | 43 for (MediaStreamDeviceMap::iterator iter = devices.begin(); |
41 iter != devices.end(); | 44 iter != devices.end(); |
42 ++iter) { | 45 ++iter) { |
43 iter->second.clear(); | 46 iter->second.clear(); |
44 } | 47 } |
45 devices.clear(); | 48 devices.clear(); |
46 } | 49 } |
47 | 50 |
48 } // namespace content | 51 } // namespace content |
OLD | NEW |