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

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

Issue 180633008: Add different error codes for getUserMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 9 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 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 bool IsAudioMediaType(MediaStreamType type) { 11 bool IsAudioMediaType(MediaStreamType type) {
12 return (type == content::MEDIA_DEVICE_AUDIO_CAPTURE || 12 return (type == MEDIA_DEVICE_AUDIO_CAPTURE ||
13 type == content::MEDIA_TAB_AUDIO_CAPTURE || 13 type == content::MEDIA_TAB_AUDIO_CAPTURE ||
14 type == content::MEDIA_LOOPBACK_AUDIO_CAPTURE); 14 type == content::MEDIA_LOOPBACK_AUDIO_CAPTURE);
15 } 15 }
16 16
17 bool IsVideoMediaType(MediaStreamType type) { 17 bool IsVideoMediaType(MediaStreamType type) {
18 return (type == content::MEDIA_DEVICE_VIDEO_CAPTURE || 18 return (type == MEDIA_DEVICE_VIDEO_CAPTURE ||
19 type == content::MEDIA_TAB_VIDEO_CAPTURE || 19 type == content::MEDIA_TAB_VIDEO_CAPTURE ||
20 type == content::MEDIA_DESKTOP_VIDEO_CAPTURE); 20 type == content::MEDIA_DESKTOP_VIDEO_CAPTURE);
21 } 21 }
22 22
23 MediaStreamDevice::MediaStreamDevice() 23 MediaStreamDevice::MediaStreamDevice()
24 : type(MEDIA_NO_SERVICE), 24 : type(MEDIA_NO_SERVICE),
25 video_facing(MEDIA_VIDEO_FACING_NONE) { 25 video_facing(MEDIA_VIDEO_FACING_NONE) {
26 } 26 }
27 27
28 MediaStreamDevice::MediaStreamDevice( 28 MediaStreamDevice::MediaStreamDevice(
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 request_type(request_type), 84 request_type(request_type),
85 requested_audio_device_id(requested_audio_device_id), 85 requested_audio_device_id(requested_audio_device_id),
86 requested_video_device_id(requested_video_device_id), 86 requested_video_device_id(requested_video_device_id),
87 audio_type(audio_type), 87 audio_type(audio_type),
88 video_type(video_type) { 88 video_type(video_type) {
89 } 89 }
90 90
91 MediaStreamRequest::~MediaStreamRequest() {} 91 MediaStreamRequest::~MediaStreamRequest() {}
92 92
93 } // namespace content 93 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/media_stream_request.h ('k') | content/renderer/media/media_stream_dependency_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698