Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(858)

Side by Side Diff: content/renderer/media/user_media_client_impl.cc

Issue 883293005: Cast: Basic cast_receiver API for chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed extra BUILD.gn line Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 weak_factory_.GetWeakPtr()), 573 weak_factory_.GetWeakPtr()),
574 dependency_factory_)); 574 dependency_factory_));
575 webkit_source->setExtraData(audio_source); 575 webkit_source->setExtraData(audio_source);
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 content::MediaStreamVideoCapturerSource* ret =
584 device, 584 new content::MediaStreamVideoCapturerSource(
585 stop_callback, 585 stop_callback,
586 scoped_ptr<VideoCapturerDelegate>(new VideoCapturerDelegate(device))); 586 make_scoped_ptr(new VideoCapturerDelegate(device)));
587 ret->SetDeviceInfo(device);
588 return ret;
587 } 589 }
588 590
589 void UserMediaClientImpl::CreateVideoTracks( 591 void UserMediaClientImpl::CreateVideoTracks(
590 const StreamDeviceInfoArray& devices, 592 const StreamDeviceInfoArray& devices,
591 const blink::WebMediaConstraints& constraints, 593 const blink::WebMediaConstraints& constraints,
592 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks, 594 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks,
593 UserMediaRequestInfo* request) { 595 UserMediaRequestInfo* request) {
594 DCHECK_EQ(devices.size(), webkit_tracks->size()); 596 DCHECK_EQ(devices.size(), webkit_tracks->size());
595 597
596 for (size_t i = 0; i < devices.size(); ++i) { 598 for (size_t i = 0; i < devices.size(); ++i) {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 return; 1056 return;
1055 } 1057 }
1056 } 1058 }
1057 } 1059 }
1058 1060
1059 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { 1061 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const {
1060 return !sources_waiting_for_callback_.empty(); 1062 return !sources_waiting_for_callback_.empty();
1061 } 1063 }
1062 1064
1063 } // namespace content 1065 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source.h ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698