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

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

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: Changes after review by xians@. 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 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 // Types of media streams. 18 // Types of media streams.
19 enum MediaStreamDeviceType { 19 enum MediaStreamDeviceType {
20 MEDIA_STREAM_DEVICE_TYPE_NO_SERVICE = 0, 20 MEDIA_NO_SERVICE = 0,
21 MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE, 21
22 MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE, 22 // A user device provided by the operating system (e.g., webcam input).
23 NUM_MEDIA_STREAM_DEVICE_TYPES 23 MEDIA_USER_AUDIO_CAPTURE,
24 MEDIA_USER_VIDEO_CAPTURE,
wjia(left Chromium) 2012/09/03 15:54:17 "user" states ownership, not the type of input str
miu 2012/09/04 20:42:19 I see your point. My original intention was that
25
26 // Mirroring of a browser tab.
27 MEDIA_TAB_AUDIO_CAPTURE,
28 MEDIA_TAB_VIDEO_CAPTURE,
29
30 NUM_MEDIA_TYPES
24 }; 31 };
25 32
33 // Convenience predicates to determine whether the given type represents some
34 // audio or some video device.
35 CONTENT_EXPORT bool IsAudioMediaType(MediaStreamDeviceType type);
36 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamDeviceType type);
37
26 // TODO(xians): Change the structs to classes. 38 // TODO(xians): Change the structs to classes.
27 // Represents one device in a request for media stream(s). 39 // Represents one device in a request for media stream(s).
28 struct CONTENT_EXPORT MediaStreamDevice { 40 struct CONTENT_EXPORT MediaStreamDevice {
29 MediaStreamDevice( 41 MediaStreamDevice(
30 MediaStreamDeviceType type, 42 MediaStreamDeviceType type,
31 const std::string& device_id, 43 const std::string& device_id,
32 const std::string& name); 44 const std::string& name);
33 45
34 ~MediaStreamDevice(); 46 ~MediaStreamDevice();
35 47
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 80
69 // A list of devices present on the user's computer, for each device type 81 // A list of devices present on the user's computer, for each device type
70 // requested. 82 // requested.
71 // All the elements in this map will be deleted in ~MediaStreamRequest(). 83 // All the elements in this map will be deleted in ~MediaStreamRequest().
72 MediaStreamDeviceMap devices; 84 MediaStreamDeviceMap devices;
73 }; 85 };
74 86
75 } // namespace content 87 } // namespace content
76 88
77 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 89 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698