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

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

Issue 294043015: Move creation of MediaStream renders from MediaStreamImpl to MediaStreamRenderFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed commments. Fixed build when enable_webrtc = 0 Created 6 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 | « content/renderer/media/media_stream_client.h ('k') | 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 4d57e3d924c26a3fa701b196139fc0ec5cd106d7..76ae25a96721f84bb6467f8e67c50ea325fc08a6 100644
--- a/content/renderer/media/media_stream_impl.h
+++ b/content/renderer/media/media_stream_impl.h
@@ -17,7 +17,6 @@
#include "base/threading/non_thread_safe.h"
#include "content/common/content_export.h"
#include "content/public/renderer/render_view_observer.h"
-#include "content/renderer/media/media_stream_client.h"
#include "content/renderer/media/media_stream_dispatcher_eventhandler.h"
#include "content/renderer/media/media_stream_source.h"
#include "third_party/WebKit/public/platform/WebMediaStream.h"
@@ -28,24 +27,20 @@
#include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
namespace content {
-class MediaStreamAudioRenderer;
class PeerConnectionDependencyFactory;
class MediaStreamDispatcher;
class MediaStreamVideoSource;
class VideoCapturerDelegate;
-class WebRtcAudioRenderer;
-class WebRtcLocalAudioRenderer;
-// MediaStreamImpl is a delegate for the Media Stream API messages used by
-// WebKit. It ties together WebKit, native PeerConnection in libjingle and
-// MediaStreamManager (via MediaStreamDispatcher and MediaStreamDispatcherHost)
+// MediaStreamImpl is a delegate for the Media Stream GetUserMedia API.
+// It ties together WebKit and 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 MediaStreamDispatcher.
class CONTENT_EXPORT MediaStreamImpl
: public RenderViewObserver,
NON_EXPORTED_BASE(public blink::WebUserMediaClient),
- NON_EXPORTED_BASE(public MediaStreamClient),
public MediaStreamDispatcherEventHandler,
public base::SupportsWeakPtr<MediaStreamImpl>,
NON_EXPORTED_BASE(public base::NonThreadSafe) {
@@ -58,18 +53,9 @@ class CONTENT_EXPORT MediaStreamImpl
// blink::WebUserMediaClient implementation
virtual void requestUserMedia(
- const blink::WebUserMediaRequest& user_media_request) OVERRIDE;
+ const blink::WebUserMediaRequest& user_media_request);
virtual void cancelUserMediaRequest(
- const blink::WebUserMediaRequest& user_media_request) OVERRIDE;
-
- // MediaStreamClient implementation.
- virtual bool IsMediaStream(const GURL& url) OVERRIDE;
- virtual scoped_refptr<VideoFrameProvider> GetVideoFrameProvider(
- const GURL& url,
- const base::Closure& error_cb,
- const VideoFrameProvider::RepaintCB& repaint_cb) OVERRIDE;
- virtual scoped_refptr<MediaStreamAudioRenderer>
- GetAudioRenderer(const GURL& url, int render_frame_id) OVERRIDE;
+ const blink::WebUserMediaRequest& user_media_request);
// MediaStreamDispatcherEventHandler implementation.
virtual void OnStreamGenerated(
@@ -109,11 +95,6 @@ class CONTENT_EXPORT MediaStreamImpl
blink::WebUserMediaRequest* request_info,
content::MediaStreamRequestResult result);
-
- // Returns the WebKit representation of a MediaStream given an URL.
- // This is virtual for test purposes.
- virtual blink::WebMediaStream GetMediaStream(const GURL& url);
-
// Creates a MediaStreamVideoSource object.
// This is virtual for test purposes.
virtual MediaStreamVideoSource* CreateVideoSource(
@@ -158,7 +139,7 @@ class CONTENT_EXPORT MediaStreamImpl
bool IsSourceUsed(const blink::WebMediaStreamSource& source) const;
void RemoveSource(const blink::WebMediaStreamSource& source);
- bool AreAllSourcesRemoved() const { return sources_.empty(); };
+ bool AreAllSourcesRemoved() const { return sources_.empty(); }
private:
void OnTrackStarted(MediaStreamSource* source, bool success);
@@ -224,22 +205,6 @@ class CONTENT_EXPORT MediaStreamImpl
void StopLocalSource(const blink::WebMediaStreamSource& source,
bool notify_dispatcher);
- scoped_refptr<WebRtcAudioRenderer> CreateRemoteAudioRenderer(
- webrtc::MediaStreamInterface* stream, int render_frame_id);
- scoped_refptr<WebRtcLocalAudioRenderer> CreateLocalAudioRenderer(
- const blink::WebMediaStreamTrack& audio_track,
- int render_frame_id);
-
- // Returns a valid session id if a single capture device is currently open
- // (and then the matching session_id), otherwise -1.
- // This is used to pass on a session id to a webrtc audio renderer (either
- // local or remote), so that audio will be rendered to a matching output
- // device, should one exist.
- // Note that if there are more than one open capture devices the function
- // will not be able to pick an appropriate device and return false.
- bool GetAuthorizedDeviceInfoForAudioRenderer(
- int* session_id, int* output_sample_rate, int* output_buffer_size);
-
// Weak ref to a PeerConnectionDependencyFactory, owned by the RenderThread.
// It's valid for the lifetime of RenderThread.
// TODO(xians): Remove this dependency once audio do not need it for local
« no previous file with comments | « content/renderer/media/media_stream_client.h ('k') | content/renderer/media/media_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698