| 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/browser/renderer_host/media/media_stream_manager.h" | 5 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 if (media_observer == NULL) | 103 if (media_observer == NULL) |
| 104 return; | 104 return; |
| 105 | 105 |
| 106 // If we appended a device_id scheme, we want to remove it when notifying | 106 // If we appended a device_id scheme, we want to remove it when notifying |
| 107 // observers which may be in different modules since this scheme is only | 107 // observers which may be in different modules since this scheme is only |
| 108 // used internally within the content module. | 108 // used internally within the content module. |
| 109 std::string device_id = | 109 std::string device_id = |
| 110 WebContentsCaptureUtil::StripWebContentsDeviceScheme( | 110 WebContentsCaptureUtil::StripWebContentsDeviceScheme( |
| 111 requested_device_id); | 111 requested_device_id); |
| 112 | 112 |
| 113 // TODO(henrika): possibly add new sample rate and channel configuration |
| 114 // here as well. See AudioInputDeviceManager::EnumerateOnDeviceThread() |
| 115 // for details. |
| 113 media_observer->OnMediaRequestStateChanged( | 116 media_observer->OnMediaRequestStateChanged( |
| 114 render_process_id, render_view_id, | 117 render_process_id, render_view_id, |
| 115 MediaStreamDevice( | 118 MediaStreamDevice( |
| 116 stream_type, device_id, device_id), new_state); | 119 stream_type, device_id, device_id), new_state); |
| 117 } | 120 } |
| 118 | 121 |
| 119 MediaRequestState state(MediaStreamType stream_type) const { | 122 MediaRequestState state(MediaStreamType stream_type) const { |
| 120 return state_[stream_type]; | 123 return state_[stream_type]; |
| 121 } | 124 } |
| 122 | 125 |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 } | 1095 } |
| 1093 | 1096 |
| 1094 // Always do enumeration even though some enumeration is in progress, | 1097 // Always do enumeration even though some enumeration is in progress, |
| 1095 // because those enumeration commands could be sent before these devices | 1098 // because those enumeration commands could be sent before these devices |
| 1096 // change. | 1099 // change. |
| 1097 ++active_enumeration_ref_count_[stream_type]; | 1100 ++active_enumeration_ref_count_[stream_type]; |
| 1098 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); | 1101 GetDeviceManager(stream_type)->EnumerateDevices(stream_type); |
| 1099 } | 1102 } |
| 1100 | 1103 |
| 1101 } // namespace content | 1104 } // namespace content |
| OLD | NEW |