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/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 webkit_sources[i].initialize( | 436 webkit_sources[i].initialize( |
437 UTF8ToUTF16(source_id), | 437 UTF8ToUTF16(source_id), |
438 type, | 438 type, |
439 UTF8ToUTF16(devices[i].device.name)); | 439 UTF8ToUTF16(devices[i].device.name)); |
440 MediaStreamSourceExtraData* source_extra_data( | 440 MediaStreamSourceExtraData* source_extra_data( |
441 new content::MediaStreamSourceExtraData( | 441 new content::MediaStreamSourceExtraData( |
442 devices[i], | 442 devices[i], |
443 base::Bind(&MediaStreamImpl::OnLocalSourceStop, AsWeakPtr()))); | 443 base::Bind(&MediaStreamImpl::OnLocalSourceStop, AsWeakPtr()))); |
444 // |source_extra_data| is owned by webkit_sources[i]. | 444 // |source_extra_data| is owned by webkit_sources[i]. |
445 webkit_sources[i].setExtraData(source_extra_data); | 445 webkit_sources[i].setExtraData(source_extra_data); |
446 webkit_sources[i].setDeviceId(UTF8ToUTF16( | |
447 base::IntToString(devices[i].session_id))); | |
448 local_sources_.push_back(LocalStreamSource(frame, webkit_sources[i])); | 446 local_sources_.push_back(LocalStreamSource(frame, webkit_sources[i])); |
449 } | 447 } |
450 } | 448 } |
451 | 449 |
452 // Callback from MediaStreamDependencyFactory when the sources in |web_stream| | 450 // Callback from MediaStreamDependencyFactory when the sources in |web_stream| |
453 // have been generated. | 451 // have been generated. |
454 void MediaStreamImpl::OnCreateNativeSourcesComplete( | 452 void MediaStreamImpl::OnCreateNativeSourcesComplete( |
455 blink::WebMediaStream* web_stream, | 453 blink::WebMediaStream* web_stream, |
456 bool request_succeeded) { | 454 bool request_succeeded) { |
457 UserMediaRequestInfo* request_info = FindUserMediaRequestInfo(web_stream); | 455 UserMediaRequestInfo* request_info = FindUserMediaRequestInfo(web_stream); |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 enable_automatic_output_device_selection( | 860 enable_automatic_output_device_selection( |
863 enable_automatic_output_device_selection), | 861 enable_automatic_output_device_selection), |
864 frame(frame), | 862 frame(frame), |
865 request(request) { | 863 request(request) { |
866 } | 864 } |
867 | 865 |
868 MediaStreamImpl::UserMediaRequestInfo::~UserMediaRequestInfo() { | 866 MediaStreamImpl::UserMediaRequestInfo::~UserMediaRequestInfo() { |
869 } | 867 } |
870 | 868 |
871 } // namespace content | 869 } // namespace content |
OLD | NEW |