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

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

Issue 2425703002: Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Remove |remote| and |readonly| members of MediaStreamTrack Created 4 years, 2 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 blink::WebMediaStreamSource* webkit_source) { 505 blink::WebMediaStreamSource* webkit_source) {
506 const blink::WebMediaStreamSource* existing_source = 506 const blink::WebMediaStreamSource* existing_source =
507 FindLocalSource(device); 507 FindLocalSource(device);
508 if (existing_source) { 508 if (existing_source) {
509 *webkit_source = *existing_source; 509 *webkit_source = *existing_source;
510 DVLOG(1) << "Source already exist. Reusing source with id " 510 DVLOG(1) << "Source already exist. Reusing source with id "
511 << webkit_source->id().utf8(); 511 << webkit_source->id().utf8();
512 return; 512 return;
513 } 513 }
514 514
515 webkit_source->initialize( 515 webkit_source->initialize(base::UTF8ToUTF16(device.device.id), type,
516 base::UTF8ToUTF16(device.device.id), 516 base::UTF8ToUTF16(device.device.name));
517 type,
518 base::UTF8ToUTF16(device.device.name),
519 false /* remote */);
520 517
521 DVLOG(1) << "Initialize source object :" 518 DVLOG(1) << "Initialize source object :"
522 << "id = " << webkit_source->id().utf8() 519 << "id = " << webkit_source->id().utf8()
523 << ", name = " << webkit_source->name().utf8(); 520 << ", name = " << webkit_source->name().utf8();
524 521
525 if (type == blink::WebMediaStreamSource::TypeVideo) { 522 if (type == blink::WebMediaStreamSource::TypeVideo) {
526 webkit_source->setExtraData( 523 webkit_source->setExtraData(
527 CreateVideoSource( 524 CreateVideoSource(
528 device, 525 device,
529 base::Bind(&UserMediaClientImpl::OnLocalSourceStopped, 526 base::Bind(&UserMediaClientImpl::OnLocalSourceStopped,
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 1033
1037 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { 1034 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const {
1038 return !sources_waiting_for_callback_.empty(); 1035 return !sources_waiting_for_callback_.empty();
1039 } 1036 }
1040 1037
1041 void UserMediaClientImpl::OnDestruct() { 1038 void UserMediaClientImpl::OnDestruct() {
1042 delete this; 1039 delete this;
1043 } 1040 }
1044 1041
1045 } // namespace content 1042 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698