| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/public/renderer/media_stream_api.h" | 5 #include "content/public/renderer/media_stream_api.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/base64.h" | 9 #include "base/base64.h" | 
| 10 #include "base/callback.h" | 10 #include "base/callback.h" | 
| 11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" | 
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" | 
|  | 13 #include "content/renderer/media/media_stream.h" | 
| 13 #include "content/renderer/media/media_stream_audio_source.h" | 14 #include "content/renderer/media/media_stream_audio_source.h" | 
| 14 #include "content/renderer/media/media_stream_video_capturer_source.h" | 15 #include "content/renderer/media/media_stream_video_capturer_source.h" | 
| 15 #include "content/renderer/media/media_stream_video_track.h" | 16 #include "content/renderer/media/media_stream_video_track.h" | 
| 16 #include "content/renderer/render_thread_impl.h" | 17 #include "content/renderer/render_thread_impl.h" | 
| 17 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 18 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 
| 18 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 19 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 
| 19 #include "third_party/WebKit/public/platform/WebURL.h" | 20 #include "third_party/WebKit/public/platform/WebURL.h" | 
| 20 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 21 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 
| 21 #include "url/gurl.h" | 22 #include "url/gurl.h" | 
| 22 | 23 | 
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 124 | 125 | 
| 125   blink::WebMediaStreamTrack web_media_audio_track; | 126   blink::WebMediaStreamTrack web_media_audio_track; | 
| 126   web_media_audio_track.initialize(webkit_source); | 127   web_media_audio_track.initialize(webkit_source); | 
| 127   RenderThreadImpl::current()->GetPeerConnectionDependencyFactory()-> | 128   RenderThreadImpl::current()->GetPeerConnectionDependencyFactory()-> | 
| 128       CreateLocalAudioTrack(web_media_audio_track); | 129       CreateLocalAudioTrack(web_media_audio_track); | 
| 129 | 130 | 
| 130   web_stream->addTrack(web_media_audio_track); | 131   web_stream->addTrack(web_media_audio_track); | 
| 131   return true; | 132   return true; | 
| 132 } | 133 } | 
| 133 | 134 | 
|  | 135 CONTENT_EXPORT void AddMediaStreamTowebMediaStream( | 
|  | 136     blink::WebMediaStream* web_stream) { | 
|  | 137   web_stream->setExtraData(new content::MediaStream()); | 
|  | 138 } | 
|  | 139 | 
| 134 }  // namespace content | 140 }  // namespace content | 
| OLD | NEW | 
|---|