| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/hash.h" | 9 #include "base/hash.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 } | 576 } |
| 577 local_sources_.push_back(*webkit_source); | 577 local_sources_.push_back(*webkit_source); |
| 578 } | 578 } |
| 579 | 579 |
| 580 MediaStreamVideoSource* UserMediaClientImpl::CreateVideoSource( | 580 MediaStreamVideoSource* UserMediaClientImpl::CreateVideoSource( |
| 581 const StreamDeviceInfo& device, | 581 const StreamDeviceInfo& device, |
| 582 const MediaStreamSource::SourceStoppedCallback& stop_callback) { | 582 const MediaStreamSource::SourceStoppedCallback& stop_callback) { |
| 583 return new content::MediaStreamVideoCapturerSource( | 583 return new content::MediaStreamVideoCapturerSource( |
| 584 device, | 584 device, |
| 585 stop_callback, | 585 stop_callback, |
| 586 scoped_ptr<VideoCapturerDelegate>(new VideoCapturerDelegate(device))); | 586 new VideoCapturerDelegate(device)); |
| 587 } | 587 } |
| 588 | 588 |
| 589 void UserMediaClientImpl::CreateVideoTracks( | 589 void UserMediaClientImpl::CreateVideoTracks( |
| 590 const StreamDeviceInfoArray& devices, | 590 const StreamDeviceInfoArray& devices, |
| 591 const blink::WebMediaConstraints& constraints, | 591 const blink::WebMediaConstraints& constraints, |
| 592 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks, | 592 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks, |
| 593 UserMediaRequestInfo* request) { | 593 UserMediaRequestInfo* request) { |
| 594 DCHECK_EQ(devices.size(), webkit_tracks->size()); | 594 DCHECK_EQ(devices.size(), webkit_tracks->size()); |
| 595 | 595 |
| 596 for (size_t i = 0; i < devices.size(); ++i) { | 596 for (size_t i = 0; i < devices.size(); ++i) { |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 return; | 1062 return; |
| 1063 } | 1063 } |
| 1064 } | 1064 } |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { | 1067 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { |
| 1068 return !sources_waiting_for_callback_.empty(); | 1068 return !sources_waiting_for_callback_.empty(); |
| 1069 } | 1069 } |
| 1070 | 1070 |
| 1071 } // namespace content | 1071 } // namespace content |
| OLD | NEW |