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

Side by Side Diff: content/renderer/media/media_stream_dependency_factory.h

Issue 11232014: Move a bunch of code in content\renderer to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 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 | Annotate | Revision Log
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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/renderer/media/media_stream_extra_data.h" 14 #include "content/renderer/media/media_stream_extra_data.h"
15 #include "content/renderer/p2p/socket_dispatcher.h" 15 #include "content/renderer/p2p/socket_dispatcher.h"
16 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h " 16 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h "
17 17
18 namespace base { 18 namespace base {
19 class WaitableEvent; 19 class WaitableEvent;
20 } 20 }
21 21
22 namespace content { 22 namespace content {
23 class IpcNetworkManager; 23 class IpcNetworkManager;
24 class IpcPacketSocketFactory; 24 class IpcPacketSocketFactory;
25 class WebRtcAudioDeviceImpl;
25 } 26 }
26 27
27 namespace talk_base { 28 namespace talk_base {
28 class NetworkManager; 29 class NetworkManager;
29 class PacketSocketFactory; 30 class PacketSocketFactory;
30 class Thread; 31 class Thread;
31 } 32 }
32 33
33 namespace webrtc { 34 namespace webrtc {
34 class PeerConnection; 35 class PeerConnection;
35 } 36 }
36 37
37 namespace WebKit { 38 namespace WebKit {
38 class WebFrame; 39 class WebFrame;
39 class WebMediaStreamDescriptor; 40 class WebMediaStreamDescriptor;
40 class WebPeerConnection00Handler; 41 class WebPeerConnection00Handler;
41 class WebPeerConnection00HandlerClient; 42 class WebPeerConnection00HandlerClient;
42 class WebRTCPeerConnectionHandler; 43 class WebRTCPeerConnectionHandler;
43 class WebRTCPeerConnectionHandlerClient; 44 class WebRTCPeerConnectionHandlerClient;
44 } 45 }
45 46
46 class VideoCaptureImplManager; 47 class VideoCaptureImplManager;
47 class WebRtcAudioDeviceImpl;
48 48
49 // Object factory for RTC MediaStreams and RTC PeerConnections. 49 // Object factory for RTC MediaStreams and RTC PeerConnections.
50 class CONTENT_EXPORT MediaStreamDependencyFactory 50 class CONTENT_EXPORT MediaStreamDependencyFactory
51 : NON_EXPORTED_BASE(public base::NonThreadSafe) { 51 : NON_EXPORTED_BASE(public base::NonThreadSafe) {
52 public: 52 public:
53 MediaStreamDependencyFactory( 53 MediaStreamDependencyFactory(
54 VideoCaptureImplManager* vc_manager, 54 VideoCaptureImplManager* vc_manager,
55 content::P2PSocketDispatcher* p2p_socket_dispatcher); 55 content::P2PSocketDispatcher* p2p_socket_dispatcher);
56 virtual ~MediaStreamDependencyFactory(); 56 virtual ~MediaStreamDependencyFactory();
57 57
(...skipping 11 matching lines...) Expand all
69 // it in the extra data field of |description|. 69 // it in the extra data field of |description|.
70 bool CreateNativeLocalMediaStream( 70 bool CreateNativeLocalMediaStream(
71 WebKit::WebMediaStreamDescriptor* description); 71 WebKit::WebMediaStreamDescriptor* description);
72 72
73 // Creates a libjingle representation of a MediaStream and stores 73 // Creates a libjingle representation of a MediaStream and stores
74 // it in the extra data field of |description|. 74 // it in the extra data field of |description|.
75 // |stream_stopped| a is callback that is run when a MediaStream have been 75 // |stream_stopped| a is callback that is run when a MediaStream have been
76 // stopped. 76 // stopped.
77 bool CreateNativeLocalMediaStream( 77 bool CreateNativeLocalMediaStream(
78 WebKit::WebMediaStreamDescriptor* description, 78 WebKit::WebMediaStreamDescriptor* description,
79 const MediaStreamExtraData::StreamStopCallback& stream_stop); 79 const content::MediaStreamExtraData::StreamStopCallback& stream_stop);
80 80
81 // Asks the libjingle PeerConnection factory to create a libjingle 81 // Asks the libjingle PeerConnection factory to create a libjingle
82 // PeerConnection object. 82 // PeerConnection object.
83 // The PeerConnection object is owned by PeerConnectionHandler. 83 // The PeerConnection object is owned by PeerConnectionHandler.
84 virtual scoped_refptr<webrtc::PeerConnectionInterface> 84 virtual scoped_refptr<webrtc::PeerConnectionInterface>
85 CreatePeerConnection(const std::string& config, 85 CreatePeerConnection(const std::string& config,
86 webrtc::PeerConnectionObserver* observer); 86 webrtc::PeerConnectionObserver* observer);
87 87
88 virtual scoped_refptr<webrtc::PeerConnectionInterface> 88 virtual scoped_refptr<webrtc::PeerConnectionInterface>
89 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers, 89 CreatePeerConnection(const webrtc::JsepInterface::IceServers& ice_servers,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 // We own network_manager_, must be deleted on the worker thread. 143 // We own network_manager_, must be deleted on the worker thread.
144 // The network manager uses |p2p_socket_dispatcher_|. 144 // The network manager uses |p2p_socket_dispatcher_|.
145 content::IpcNetworkManager* network_manager_; 145 content::IpcNetworkManager* network_manager_;
146 scoped_ptr<content::IpcPacketSocketFactory> socket_factory_; 146 scoped_ptr<content::IpcPacketSocketFactory> socket_factory_;
147 147
148 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_; 148 scoped_refptr<webrtc::PeerConnectionFactoryInterface> pc_factory_;
149 149
150 scoped_refptr<VideoCaptureImplManager> vc_manager_; 150 scoped_refptr<VideoCaptureImplManager> vc_manager_;
151 scoped_refptr<content::P2PSocketDispatcher> p2p_socket_dispatcher_; 151 scoped_refptr<content::P2PSocketDispatcher> p2p_socket_dispatcher_;
152 scoped_refptr<WebRtcAudioDeviceImpl> audio_device_; 152 scoped_refptr<content::WebRtcAudioDeviceImpl> audio_device_;
153 153
154 // PeerConnection threads. signaling_thread_ is created from the 154 // PeerConnection threads. signaling_thread_ is created from the
155 // "current" chrome thread. 155 // "current" chrome thread.
156 talk_base::Thread* signaling_thread_; 156 talk_base::Thread* signaling_thread_;
157 talk_base::Thread* worker_thread_; 157 talk_base::Thread* worker_thread_;
158 base::Thread chrome_worker_thread_; 158 base::Thread chrome_worker_thread_;
159 159
160 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); 160 DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory);
161 }; 161 };
162 162
163 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ 163 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
OLDNEW
« no previous file with comments | « content/renderer/media/audio_hardware.cc ('k') | content/renderer/media/media_stream_dependency_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698