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

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

Issue 2123863004: ScreenCapture for Android phase1, part II (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UI tweaking and rebase Created 4 years, 4 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
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 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 bool IsAudioInputMediaType(MediaStreamType type) { 12 bool IsAudioInputMediaType(MediaStreamType type) {
13 return (type == MEDIA_DEVICE_AUDIO_CAPTURE || 13 return (type == MEDIA_DEVICE_AUDIO_CAPTURE ||
14 type == content::MEDIA_TAB_AUDIO_CAPTURE || 14 type == MEDIA_TAB_AUDIO_CAPTURE ||
15 type == content::MEDIA_DESKTOP_AUDIO_CAPTURE); 15 type == MEDIA_DESKTOP_AUDIO_CAPTURE);
16 } 16 }
17 17
18 bool IsVideoMediaType(MediaStreamType type) { 18 bool IsVideoMediaType(MediaStreamType type) {
19 return (type == MEDIA_DEVICE_VIDEO_CAPTURE || 19 return (type == MEDIA_DEVICE_VIDEO_CAPTURE ||
20 type == content::MEDIA_TAB_VIDEO_CAPTURE || 20 type == MEDIA_TAB_VIDEO_CAPTURE ||
21 type == content::MEDIA_DESKTOP_VIDEO_CAPTURE); 21 type == MEDIA_DESKTOP_VIDEO_CAPTURE);
22 }
23
24 bool IsScreenCaptureMediaType(MediaStreamType type) {
25 return (type == MEDIA_TAB_AUDIO_CAPTURE ||
26 type == MEDIA_TAB_VIDEO_CAPTURE ||
27 type == MEDIA_DESKTOP_AUDIO_CAPTURE ||
28 type == MEDIA_DESKTOP_VIDEO_CAPTURE);
22 } 29 }
23 30
24 MediaStreamDevice::MediaStreamDevice() 31 MediaStreamDevice::MediaStreamDevice()
25 : type(MEDIA_NO_SERVICE), 32 : type(MEDIA_NO_SERVICE),
26 video_facing(MEDIA_VIDEO_FACING_NONE) { 33 video_facing(MEDIA_VIDEO_FACING_NONE) {
27 } 34 }
28 35
29 MediaStreamDevice::MediaStreamDevice( 36 MediaStreamDevice::MediaStreamDevice(
30 MediaStreamType type, 37 MediaStreamType type,
31 const std::string& id, 38 const std::string& id,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 video_type(video_type), 133 video_type(video_type),
127 all_ancestors_have_same_origin(false) { 134 all_ancestors_have_same_origin(false) {
128 } 135 }
129 136
130 MediaStreamRequest::MediaStreamRequest(const MediaStreamRequest& other) = 137 MediaStreamRequest::MediaStreamRequest(const MediaStreamRequest& other) =
131 default; 138 default;
132 139
133 MediaStreamRequest::~MediaStreamRequest() {} 140 MediaStreamRequest::~MediaStreamRequest() {}
134 141
135 } // namespace content 142 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698