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

Unified Diff: chrome/renderer/media/cast_session.h

Issue 66293003: P2P <-> cast library integration v0.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | chrome/renderer/media/cast_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/cast_session.h
diff --git a/chrome/renderer/media/cast_session.h b/chrome/renderer/media/cast_session.h
index 6bec7f9a3f16d949d9446c225e75ad18134044c6..34662e3bb6bb06fbe796236d7867455e0023f974 100644
--- a/chrome/renderer/media/cast_session.h
+++ b/chrome/renderer/media/cast_session.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "net/base/ip_endpoint.h"
namespace base {
class MessageLoopProxy;
@@ -20,6 +21,10 @@ struct VideoSenderConfig;
} // namespace cast
} // namespace media
+namespace content{
+class P2PSocketClient;
+} // namespace content
+
class CastSessionDelegate;
// This class represents a Cast session and allows the session to be
@@ -33,6 +38,24 @@ class CastSession : public base::RefCounted<CastSession> {
void StartAudio(const media::cast::AudioSenderConfig& config);
void StartVideo(const media::cast::VideoSenderConfig& config);
+ class P2PSocketFactory {
+ public:
+ virtual ~P2PSocketFactory();
+
+ // Called on IO thread.
+ virtual scoped_refptr<content::P2PSocketClient> Create() = 0;
+ };
+
+ // Send the socket factory to the delegate, where create will be
+ // called. The delegate will then delete the socket factory on the
+ // IO thread. We do it this way because the P2P socket needs to
+ // be created on the same thread that the callbacks will be called on.
+ // The |remote_endpoint| is the address will be used when calling
+ // SendWithDscp on the P2PSocketClient.
+ // Takes ownership of socket_factory.
+ void SetSocketFactory(scoped_ptr<P2PSocketFactory> socket_factory,
+ const net::IPEndPoint& remote_address);
+
private:
friend class base::RefCounted<CastSession>;
virtual ~CastSession();
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | chrome/renderer/media/cast_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698