| 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/renderer/media/user_media_client_impl.h" | 5 #include "content/renderer/media/user_media_client_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 | 1047 |
| 1048 UserMediaClientImpl::UserMediaRequestInfo::~UserMediaRequestInfo() { | 1048 UserMediaClientImpl::UserMediaRequestInfo::~UserMediaRequestInfo() { |
| 1049 DVLOG(1) << "~UserMediaRequestInfo"; | 1049 DVLOG(1) << "~UserMediaRequestInfo"; |
| 1050 } | 1050 } |
| 1051 | 1051 |
| 1052 void UserMediaClientImpl::UserMediaRequestInfo::StartAudioTrack( | 1052 void UserMediaClientImpl::UserMediaRequestInfo::StartAudioTrack( |
| 1053 const blink::WebMediaStreamTrack& track, | 1053 const blink::WebMediaStreamTrack& track, |
| 1054 const blink::WebMediaConstraints& constraints) { | 1054 const blink::WebMediaConstraints& constraints) { |
| 1055 DCHECK(track.source().type() == blink::WebMediaStreamSource::TypeAudio); | 1055 DCHECK(track.source().type() == blink::WebMediaStreamSource::TypeAudio); |
| 1056 MediaStreamAudioSource* native_source = | 1056 MediaStreamAudioSource* native_source = |
| 1057 static_cast <MediaStreamAudioSource*>(track.source().extraData()); | 1057 MediaStreamAudioSource::From(track.source()); |
| 1058 DCHECK(native_source); | 1058 DCHECK(native_source); |
| 1059 | 1059 |
| 1060 sources_.push_back(track.source()); | 1060 sources_.push_back(track.source()); |
| 1061 sources_waiting_for_callback_.push_back(native_source); | 1061 sources_waiting_for_callback_.push_back(native_source); |
| 1062 native_source->AddTrack( | 1062 native_source->AddTrack( |
| 1063 track, constraints, base::Bind( | 1063 track, constraints, base::Bind( |
| 1064 &UserMediaClientImpl::UserMediaRequestInfo::OnTrackStarted, | 1064 &UserMediaClientImpl::UserMediaRequestInfo::OnTrackStarted, |
| 1065 AsWeakPtr())); | 1065 AsWeakPtr())); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 return; | 1137 return; |
| 1138 } | 1138 } |
| 1139 } | 1139 } |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { | 1142 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { |
| 1143 return !sources_waiting_for_callback_.empty(); | 1143 return !sources_waiting_for_callback_.empty(); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 } // namespace content | 1146 } // namespace content |
| OLD | NEW |