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

Side by Side Diff: content/common/media/media_stream_options.h

Issue 2538033003: Implement GetUserMedia device ID constraint processing in the renderer. (Closed)
Patch Set: fixes Created 4 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
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_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ 5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ 6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 15 matching lines...) Expand all
26 TrackControls(); 26 TrackControls();
27 explicit TrackControls(bool request); 27 explicit TrackControls(bool request);
28 explicit TrackControls(const TrackControls& other); 28 explicit TrackControls(const TrackControls& other);
29 ~TrackControls(); 29 ~TrackControls();
30 bool requested; 30 bool requested;
31 31
32 // Source. This is "tab", "screen", "desktop", "system", or blank. 32 // Source. This is "tab", "screen", "desktop", "system", or blank.
33 // Consider replacing with MediaStreamType enum variables. 33 // Consider replacing with MediaStreamType enum variables.
34 std::string stream_source; // audio.kMediaStreamSource 34 std::string stream_source; // audio.kMediaStreamSource
35 35
36 // Device ID requests. 36 // Empty string represents the default device.
37 // The first set represents required devices - either grab one or fail. 37 // Nonempty string represents a specific device.
hta - Chromium 2016/11/30 18:51:42 Nit, English: "An empty string represents the defa
Guido Urdaneta 2016/12/01 10:28:53 Done.
38 // The second set represents optional devices - if we can't get one of 38 std::string device_id;
39 // these, we will grab the default device (if possible).
40 // The constraint names are "sourceId" and "chromeMediaSourceId".
41 std::vector<std::string> device_ids;
42 std::vector<std::string> alternate_device_ids;
43 }; 39 };
44 40
45 // StreamControls describes what is sent to the browser process 41 // StreamControls describes what is sent to the browser process
46 // to the renderer process in order to control the opening of a device 42 // to the renderer process in order to control the opening of a device
hta - Chromium 2016/11/30 18:51:43 Fix the grammar of "to the browser proces to the r
Guido Urdaneta 2016/12/01 10:28:53 Done.
47 // pair. This may result in opening one audio and/or one video device. 43 // pair. This may result in opening one audio and/or one video device.
48 // This has to be a struct with public members in order to allow it to 44 // This has to be a struct with public members in order to allow it to
49 // be sent in the IPC of media_stream_messages.h 45 // be sent in the IPC of media_stream_messages.h
50 struct CONTENT_EXPORT StreamControls { 46 struct CONTENT_EXPORT StreamControls {
51 public: 47 public:
52 StreamControls(); 48 StreamControls();
53 StreamControls(bool request_audio, bool request_video); 49 StreamControls(bool request_audio, bool request_video);
54 ~StreamControls(); 50 ~StreamControls();
55 TrackControls audio; 51 TrackControls audio;
56 TrackControls video; 52 TrackControls video;
(...skipping 24 matching lines...) Expand all
81 77
82 // Id for this capture session. Unique for all sessions of the same type. 78 // Id for this capture session. Unique for all sessions of the same type.
83 int session_id; 79 int session_id;
84 }; 80 };
85 81
86 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; 82 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray;
87 83
88 } // namespace content 84 } // namespace content
89 85
90 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ 86 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698