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

Unified Diff: content/renderer/media/media_stream_impl.h

Issue 10917167: Refactor the P2PSocketDispatcher to be created on the RenderThread instead of the RenderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary destruction callback. Removed remaining routing_id. Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_impl.h
diff --git a/content/renderer/media/media_stream_impl.h b/content/renderer/media/media_stream_impl.h
index 970a2f2f768f5bda328c1d8b35feb2ba78713367..189dac2dd0457655b4a1651184cd2a4800848739 100644
--- a/content/renderer/media/media_stream_impl.h
+++ b/content/renderer/media/media_stream_impl.h
@@ -74,7 +74,6 @@ class CONTENT_EXPORT MediaStreamImpl
NON_EXPORTED_BASE(public webkit_media::MediaStreamClient),
public MediaStreamDispatcherEventHandler,
public base::SupportsWeakPtr<MediaStreamImpl>,
- NON_EXPORTED_BASE(public content::P2PSocketDispatcherDestructionObserver),
NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
MediaStreamImpl(
@@ -136,11 +135,6 @@ class CONTENT_EXPORT MediaStreamImpl
// content::RenderViewObserver OVERRIDE
virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE;
- // content P2PSocketDispatcherDestructionObserver implementation.
- // This is needed since all IpcNetworkManager must be deleted before the
- // P2PSocketDispatcher is destroyed. MediaStreamImpl owns a IpcNetworkManager.
- virtual void OnSocketDispatcherDestroyed() OVERRIDE;
-
protected:
// This function is virtual for test purposes. A test can override this to
// test requesting local media streams. The function notifies WebKit that the
@@ -198,9 +192,7 @@ class CONTENT_EXPORT MediaStreamImpl
// valid for the lifetime of RenderView.
MediaStreamDispatcher* media_stream_dispatcher_;
- // p2p_socket_dispatcher_ is a weak reference, owned by RenderView. It's valid
- // for the lifetime of RenderView.
- content::P2PSocketDispatcher* p2p_socket_dispatcher_;
+ scoped_refptr<content::P2PSocketDispatcher> p2p_socket_dispatcher_;
// We own network_manager_, must be deleted on the worker thread.
// The network manager uses |p2p_socket_dispatcher_|.

Powered by Google App Engine
This is Rietveld 408576698