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

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

Issue 10387135: Add deletion observer to P2PSocketDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dll export. Created 8 years, 7 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
« no previous file with comments | « no previous file | content/renderer/media/media_stream_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c6aa2638175b69790959fd28553753e7656d677a..fdb479b56cdc7daaef145b4fb889701165eeaabe 100644
--- a/content/renderer/media/media_stream_impl.h
+++ b/content/renderer/media/media_stream_impl.h
@@ -24,6 +24,7 @@
#include "content/renderer/media/media_stream_extra_data.h"
#include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
#include "content/renderer/media/rtc_video_decoder.h"
+#include "content/renderer/p2p/socket_dispatcher.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediastream.h"
#include "third_party/libjingle/source/talk/base/scoped_ref_ptr.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h"
@@ -37,7 +38,6 @@ class WaitableEvent;
namespace content {
class IpcNetworkManager;
class IpcPacketSocketFactory;
-class P2PSocketDispatcher;
}
namespace talk_base {
@@ -74,6 +74,7 @@ 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(
@@ -137,6 +138,11 @@ 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
@@ -188,6 +194,7 @@ class CONTENT_EXPORT MediaStreamImpl
void DeleteIpcNetworkManager();
bool EnsurePeerConnectionFactory();
+ void CleanupPeerConnectionFactory();
PeerConnectionHandlerBase* FindPeerConnectionByStream(
const WebKit::WebMediaStreamDescriptor& stream);
« no previous file with comments | « no previous file | content/renderer/media/media_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698