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

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

Issue 2767963002: Revert of Remove |remote| and |readonly| members of MediaStreamTrack. (Closed)
Patch Set: rebase Created 3 years, 9 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 <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 return *existing_source; 1093 return *existing_source;
1094 } 1094 }
1095 1095
1096 blink::WebMediaStreamSource::Type type = 1096 blink::WebMediaStreamSource::Type type =
1097 IsAudioInputMediaType(device.device.type) 1097 IsAudioInputMediaType(device.device.type)
1098 ? blink::WebMediaStreamSource::TypeAudio 1098 ? blink::WebMediaStreamSource::TypeAudio
1099 : blink::WebMediaStreamSource::TypeVideo; 1099 : blink::WebMediaStreamSource::TypeVideo;
1100 1100
1101 blink::WebMediaStreamSource source; 1101 blink::WebMediaStreamSource source;
1102 source.initialize(blink::WebString::fromUTF8(device.device.id), type, 1102 source.initialize(blink::WebString::fromUTF8(device.device.id), type,
1103 blink::WebString::fromUTF8(device.device.name)); 1103 blink::WebString::fromUTF8(device.device.name),
1104 false /* remote */);
1104 1105
1105 DVLOG(1) << "Initialize source object :" 1106 DVLOG(1) << "Initialize source object :"
1106 << "id = " << source.id().utf8() 1107 << "id = " << source.id().utf8()
1107 << ", name = " << source.name().utf8(); 1108 << ", name = " << source.name().utf8();
1108 return source; 1109 return source;
1109 } 1110 }
1110 1111
1111 bool UserMediaClientImpl::RemoveLocalSource( 1112 bool UserMediaClientImpl::RemoveLocalSource(
1112 const blink::WebMediaStreamSource& source) { 1113 const blink::WebMediaStreamSource& source) {
1113 DCHECK(CalledOnValidThread()); 1114 DCHECK(CalledOnValidThread());
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 const blink::WebString& result_name) { 1363 const blink::WebString& result_name) {
1363 // Check if we're waiting to be notified of this source. If not, then we'll 1364 // Check if we're waiting to be notified of this source. If not, then we'll
1364 // ignore the notification. 1365 // ignore the notification.
1365 auto found = std::find(sources_waiting_for_callback_.begin(), 1366 auto found = std::find(sources_waiting_for_callback_.begin(),
1366 sources_waiting_for_callback_.end(), source); 1367 sources_waiting_for_callback_.end(), source);
1367 if (found != sources_waiting_for_callback_.end()) 1368 if (found != sources_waiting_for_callback_.end())
1368 OnTrackStarted(source, result, result_name); 1369 OnTrackStarted(source, result, result_name);
1369 } 1370 }
1370 1371
1371 } // namespace content 1372 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698