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

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

Issue 11446042: Make sure that all OpenDevice requests are scrutinized against the audio and video policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved RequestType according to Shijing's proposal. Created 8 years 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) { 9 bool IsAudioMediaType(MediaStreamDeviceType type) {
10 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE || 10 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE ||
(...skipping 12 matching lines...) Expand all
23 : type(type), 23 : type(type),
24 device_id(device_id), 24 device_id(device_id),
25 name(name) { 25 name(name) {
26 } 26 }
27 27
28 MediaStreamDevice::~MediaStreamDevice() {} 28 MediaStreamDevice::~MediaStreamDevice() {}
29 29
30 MediaStreamRequest::MediaStreamRequest( 30 MediaStreamRequest::MediaStreamRequest(
31 int render_process_id, 31 int render_process_id,
32 int render_view_id, 32 int render_view_id,
33 const GURL& security_origin) 33 const GURL& security_origin,
34 MediaStreamRequestType request_type)
34 : render_process_id(render_process_id), 35 : render_process_id(render_process_id),
35 render_view_id(render_view_id), 36 render_view_id(render_view_id),
36 security_origin(security_origin) { 37 security_origin(security_origin),
38 request_type(request_type) {
37 } 39 }
38 40
39 MediaStreamRequest::~MediaStreamRequest() { 41 MediaStreamRequest::~MediaStreamRequest() {
40 for (MediaStreamDeviceMap::iterator iter = devices.begin(); 42 for (MediaStreamDeviceMap::iterator iter = devices.begin();
41 iter != devices.end(); 43 iter != devices.end();
42 ++iter) { 44 ++iter) {
43 iter->second.clear(); 45 iter->second.clear();
44 } 46 }
45 devices.clear(); 47 devices.clear();
46 } 48 }
47 49
48 } // namespace content 50 } // namespace content
OLDNEW
« content/public/common/media_stream_request.h ('K') | « content/public/common/media_stream_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698