Index: content/renderer/media/media_stream_dependency_factory.h |
diff --git a/content/renderer/media/media_stream_dependency_factory.h b/content/renderer/media/media_stream_dependency_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6d42d84778eded7b9dafb1be206ab582406a723b |
--- /dev/null |
+++ b/content/renderer/media/media_stream_dependency_factory.h |
@@ -0,0 +1,60 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
+#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "third_party/libjingle/source/talk/app/webrtc/peerconnectionfactory.h" |
+ |
+namespace content { |
+class IpcNetworkManager; |
+class IpcPacketSocketFactory; |
+class P2PSocketDispatcher; |
+} |
+ |
+namespace cricket { |
+class HttpPortAllocator; |
+class MediaEngineInterface; |
+class PortAllocator; |
+class WebRtcMediaEngine; |
+} |
+ |
+namespace talk_base { |
+class NetworkManager; |
+class PacketSocketFactory; |
+class Thread; |
+} |
+ |
+namespace webrtc { |
+class PeerConnection; |
+class VideoCaptureModule; |
+} |
+ |
+// A factory for creating different objects for MediaStreamImpl. |
+class MediaStreamDependencyFactory { |
+ public: |
+ MediaStreamDependencyFactory(); |
+ virtual ~MediaStreamDependencyFactory(); |
+ |
+ virtual cricket::WebRtcMediaEngine* CreateWebRtcMediaEngine(); |
+ virtual bool CreatePeerConnectionFactory( |
+ cricket::PortAllocator* port_allocator, |
+ cricket::MediaEngineInterface* media_engine, |
+ talk_base::Thread* worker_thread); |
+ virtual void DeletePeerConnectionFactory(); |
+ virtual bool PeerConnectionFactoryCreated(); |
+ virtual webrtc::PeerConnection* CreatePeerConnection( |
+ talk_base::Thread* signaling_thread); |
+ |
+ private: |
+ scoped_ptr<webrtc::PeerConnectionFactory> pc_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MediaStreamDependencyFactory); |
+}; |
+ |
+#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |