Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: content/public/common/media_stream_request.cc

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 bool IsAudioMediaType(MediaStreamDeviceType type) {
10 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE ||
11 type == content::MEDIA_TAB_AUDIO_CAPTURE);
12 }
13
14 bool IsVideoMediaType(MediaStreamDeviceType type) {
15 return (type == content::MEDIA_DEVICE_VIDEO_CAPTURE ||
16 type == content::MEDIA_TAB_VIDEO_CAPTURE);
17 }
18
9 MediaStreamDevice::MediaStreamDevice( 19 MediaStreamDevice::MediaStreamDevice(
10 MediaStreamDeviceType type, 20 MediaStreamDeviceType type,
11 const std::string& device_id, 21 const std::string& device_id,
12 const std::string& name) 22 const std::string& name)
13 : type(type), 23 : type(type),
14 device_id(device_id), 24 device_id(device_id),
15 name(name) { 25 name(name) {
16 } 26 }
17 27
18 MediaStreamDevice::~MediaStreamDevice() {} 28 MediaStreamDevice::~MediaStreamDevice() {}
(...skipping 10 matching lines...) Expand all
29 MediaStreamRequest::~MediaStreamRequest() { 39 MediaStreamRequest::~MediaStreamRequest() {
30 for (MediaStreamDeviceMap::iterator iter = devices.begin(); 40 for (MediaStreamDeviceMap::iterator iter = devices.begin();
31 iter != devices.end(); 41 iter != devices.end();
32 ++iter) { 42 ++iter) {
33 iter->second.clear(); 43 iter->second.clear();
34 } 44 }
35 devices.clear(); 45 devices.clear();
36 } 46 }
37 47
38 } // namespace content 48 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/media_stream_request.h ('k') | content/renderer/media/media_stream_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698