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

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

Issue 10108016: Refactored MediaStreamImpl to be a RenderViewObserver as the other delegates in RenderViewImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed messed up MockMediaStreamImpl. Created 8 years, 8 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') | content/renderer/render_view_impl.h » ('J')
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 a9c2db7caa0954cd3b0ae1fe0c5c1dbf82760dbf..26883137f3f428d87a9651861585588567b93f8f 100644
--- a/content/renderer/media/media_stream_impl.h
+++ b/content/renderer/media/media_stream_impl.h
@@ -20,6 +20,7 @@
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
#include "content/common/content_export.h"
+#include "content/public/renderer/render_view_observer.h"
#include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
#include "content/renderer/media/rtc_video_decoder.h"
#include "third_party/libjingle/source/talk/app/webrtc/mediastream.h"
@@ -60,15 +61,19 @@ class RTCVideoDecoder;
// MediaStreamManager (via MediaStreamDispatcher and MediaStreamDispatcherHost)
// in the browser process. It must be created, called and destroyed on the
// render thread.
+// MediaStreamImpl have weak pointers to a P2PSocketDispatcher and a
+// MediaStreamDispatcher. These objects are also RenderViewObservers.
+// MediaStreamImpl must be deleted before the P2PSocketDispatcher.
class CONTENT_EXPORT MediaStreamImpl
- : NON_EXPORTED_BASE(public WebKit::WebUserMediaClient),
+ : public content::RenderViewObserver,
+ NON_EXPORTED_BASE(public WebKit::WebUserMediaClient),
NON_EXPORTED_BASE(public webkit_media::MediaStreamClient),
public MediaStreamDispatcherEventHandler,
- NON_EXPORTED_BASE(public base::NonThreadSafe),
- public base::RefCountedThreadSafe<MediaStreamImpl>,
- public base::SupportsWeakPtr<MediaStreamImpl> {
+ public base::SupportsWeakPtr<MediaStreamImpl>,
+ NON_EXPORTED_BASE(public base::NonThreadSafe) {
public:
MediaStreamImpl(
+ content::RenderView* render_view,
MediaStreamDispatcher* media_stream_dispatcher,
content::P2PSocketDispatcher* p2p_socket_dispatcher,
VideoCaptureImplManager* vc_manager,
@@ -159,6 +164,7 @@ class CONTENT_EXPORT MediaStreamImpl
content::P2PSocketDispatcher* p2p_socket_dispatcher_;
// We own network_manager_, must be deleted on the worker thread.
+ // The network manager uses |p2p_socket_dispatcher_|.
content::IpcNetworkManager* network_manager_;
scoped_ptr<content::IpcPacketSocketFactory> socket_factory_;
« no previous file with comments | « no previous file | content/renderer/media/media_stream_impl.cc » ('j') | content/renderer/render_view_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698