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/media_stream_impl.h" | 5 #include "content/renderer/media/media_stream_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 if (it == user_media_requests_.end()) { | 278 if (it == user_media_requests_.end()) { |
279 DVLOG(1) << "Request ID not found"; | 279 DVLOG(1) << "Request ID not found"; |
280 return; | 280 return; |
281 } | 281 } |
282 WebKit::WebUserMediaRequest user_media_request(it->second.request_); | 282 WebKit::WebUserMediaRequest user_media_request(it->second.request_); |
283 user_media_requests_.erase(it); | 283 user_media_requests_.erase(it); |
284 | 284 |
285 user_media_request.requestFailed(); | 285 user_media_request.requestFailed(); |
286 } | 286 } |
287 | 287 |
288 void MediaStreamImpl::OnVideoDeviceFailed(const std::string& label, | |
289 int index) { | |
290 DCHECK(CalledOnValidThread()); | |
291 DVLOG(1) << "MediaStreamImpl::OnVideoDeviceFailed(" | |
292 << label << ", " << index << ")"; | |
293 // TODO(grunell): Implement. Currently not supported in WebKit. | |
294 NOTIMPLEMENTED(); | |
295 } | |
296 | |
297 void MediaStreamImpl::OnAudioDeviceFailed(const std::string& label, | |
298 int index) { | |
299 DCHECK(CalledOnValidThread()); | |
300 DVLOG(1) << "MediaStreamImpl::OnAudioDeviceFailed(" | |
301 << label << ", " << index << ")"; | |
302 // TODO(grunell): Implement. Currently not supported in WebKit. | |
303 NOTIMPLEMENTED(); | |
304 } | |
305 | |
306 void MediaStreamImpl::OnDevicesEnumerated( | 288 void MediaStreamImpl::OnDevicesEnumerated( |
307 int request_id, | 289 int request_id, |
308 const media_stream::StreamDeviceInfoArray& device_array) { | 290 const media_stream::StreamDeviceInfoArray& device_array) { |
309 DVLOG(1) << "MediaStreamImpl::OnDevicesEnumerated(" | 291 DVLOG(1) << "MediaStreamImpl::OnDevicesEnumerated(" |
310 << request_id << ")"; | 292 << request_id << ")"; |
311 NOTIMPLEMENTED(); | 293 NOTIMPLEMENTED(); |
312 } | 294 } |
313 | 295 |
314 void MediaStreamImpl::OnDevicesEnumerationFailed(int request_id) { | 296 void MediaStreamImpl::OnDevicesEnumerationFailed(int request_id) { |
315 DVLOG(1) << "MediaStreamImpl::OnDevicesEnumerationFailed(" | 297 DVLOG(1) << "MediaStreamImpl::OnDevicesEnumerationFailed(" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 443 |
462 void MediaStreamExtraData::SetLocalStreamStopCallback( | 444 void MediaStreamExtraData::SetLocalStreamStopCallback( |
463 const StreamStopCallback& stop_callback) { | 445 const StreamStopCallback& stop_callback) { |
464 stream_stop_callback_ = stop_callback; | 446 stream_stop_callback_ = stop_callback; |
465 } | 447 } |
466 | 448 |
467 void MediaStreamExtraData::OnLocalStreamStop() { | 449 void MediaStreamExtraData::OnLocalStreamStop() { |
468 if (!stream_stop_callback_.is_null()) | 450 if (!stream_stop_callback_.is_null()) |
469 stream_stop_callback_.Run(local_stream_->label()); | 451 stream_stop_callback_.Run(local_stream_->label()); |
470 } | 452 } |
OLD | NEW |