| OLD | NEW |
| 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/common/media/media_stream_options.h" | 5 #include "content/common/media/media_stream_options.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| 11 const char kMediaStreamSource[] = "chromeMediaSource"; | 11 const char kMediaStreamSource[] = "chromeMediaSource"; |
| 12 const char kMediaStreamSourceId[] = "chromeMediaSourceId"; | 12 const char kMediaStreamSourceId[] = "chromeMediaSourceId"; |
| 13 const char kMediaStreamSourceInfoId[] = "sourceId"; | 13 const char kMediaStreamSourceInfoId[] = "sourceId"; |
| 14 const char kMediaStreamSourceTab[] = "tab"; | 14 const char kMediaStreamSourceTab[] = "tab"; |
| 15 const char kMediaStreamSourceScreen[] = "screen"; | 15 const char kMediaStreamSourceScreen[] = "screen"; |
| 16 const char kMediaStreamSourceDesktop[] = "desktop"; | 16 const char kMediaStreamSourceDesktop[] = "desktop"; |
| 17 const char kMediaStreamSourceSystem[] = "system"; | 17 const char kMediaStreamSourceSystem[] = "system"; |
| 18 const char kMediaStreamRenderToAssociatedSink[] = | 18 const char kMediaStreamRenderToAssociatedSink[] = |
| 19 "chromeRenderToAssociatedSink"; | 19 "chromeRenderToAssociatedSink"; |
| 20 // The prefix of this constant is 'goog' to match with other getUserMedia | 20 // The prefix of this constant is 'goog' to match with other getUserMedia |
| 21 // constraints for audio. | 21 // constraints for audio. |
| 22 const char kMediaStreamAudioDucking[] = "googDucking"; | 22 const char kMediaStreamAudioDucking[] = "googDucking"; |
| 23 const char kMediaStreamAudioHotword[] = "googHotword"; |
| 23 | 24 |
| 24 namespace { | 25 namespace { |
| 25 | 26 |
| 26 bool GetFirstConstraintByName(const StreamOptions::Constraints& constraints, | 27 bool GetFirstConstraintByName(const StreamOptions::Constraints& constraints, |
| 27 const std::string& name, | 28 const std::string& name, |
| 28 std::string* value) { | 29 std::string* value) { |
| 29 for (StreamOptions::Constraints::const_iterator it = constraints.begin(); | 30 for (StreamOptions::Constraints::const_iterator it = constraints.begin(); |
| 30 it != constraints.end(); ++it ) { | 31 it != constraints.end(); ++it ) { |
| 31 if (it->name == name) { | 32 if (it->name == name) { |
| 32 *value = it->value; | 33 *value = it->value; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 122 } |
| 122 | 123 |
| 123 // static | 124 // static |
| 124 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first, | 125 bool StreamDeviceInfo::IsEqual(const StreamDeviceInfo& first, |
| 125 const StreamDeviceInfo& second) { | 126 const StreamDeviceInfo& second) { |
| 126 return first.device.IsEqual(second.device) && | 127 return first.device.IsEqual(second.device) && |
| 127 first.session_id == second.session_id; | 128 first.session_id == second.session_id; |
| 128 } | 129 } |
| 129 | 130 |
| 130 } // namespace content | 131 } // namespace content |
| OLD | NEW |