| 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 <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include <algorithm> | 9 #include <algorithm> | 
| 10 #include <utility> | 10 #include <utility> | 
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 988     return *existing_source; | 988     return *existing_source; | 
| 989   } | 989   } | 
| 990 | 990 | 
| 991   blink::WebMediaStreamSource::Type type = | 991   blink::WebMediaStreamSource::Type type = | 
| 992       IsAudioInputMediaType(device.device.type) | 992       IsAudioInputMediaType(device.device.type) | 
| 993           ? blink::WebMediaStreamSource::TypeAudio | 993           ? blink::WebMediaStreamSource::TypeAudio | 
| 994           : blink::WebMediaStreamSource::TypeVideo; | 994           : blink::WebMediaStreamSource::TypeVideo; | 
| 995 | 995 | 
| 996   blink::WebMediaStreamSource source; | 996   blink::WebMediaStreamSource source; | 
| 997   source.initialize(blink::WebString::fromUTF8(device.device.id), type, | 997   source.initialize(blink::WebString::fromUTF8(device.device.id), type, | 
| 998                     blink::WebString::fromUTF8(device.device.name), | 998                     blink::WebString::fromUTF8(device.device.name)); | 
| 999                     false /* remote */); |  | 
| 1000 | 999 | 
| 1001   DVLOG(1) << "Initialize source object :" | 1000   DVLOG(1) << "Initialize source object :" | 
| 1002            << "id = " << source.id().utf8() | 1001            << "id = " << source.id().utf8() | 
| 1003            << ", name = " << source.name().utf8(); | 1002            << ", name = " << source.name().utf8(); | 
| 1004   return source; | 1003   return source; | 
| 1005 } | 1004 } | 
| 1006 | 1005 | 
| 1007 bool UserMediaClientImpl::RemoveLocalSource( | 1006 bool UserMediaClientImpl::RemoveLocalSource( | 
| 1008     const blink::WebMediaStreamSource& source) { | 1007     const blink::WebMediaStreamSource& source) { | 
| 1009   DCHECK(CalledOnValidThread()); | 1008   DCHECK(CalledOnValidThread()); | 
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1246                          sources_waiting_for_callback_.end(), source); | 1245                          sources_waiting_for_callback_.end(), source); | 
| 1247   if (found != sources_waiting_for_callback_.end()) | 1246   if (found != sources_waiting_for_callback_.end()) | 
| 1248     OnTrackStarted(source, result, result_name); | 1247     OnTrackStarted(source, result, result_name); | 
| 1249 } | 1248 } | 
| 1250 | 1249 | 
| 1251 void UserMediaClientImpl::OnDestruct() { | 1250 void UserMediaClientImpl::OnDestruct() { | 
| 1252   delete this; | 1251   delete this; | 
| 1253 } | 1252 } | 
| 1254 | 1253 | 
| 1255 }  // namespace content | 1254 }  // namespace content | 
| OLD | NEW | 
|---|