diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-23 01:20:37 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-23 01:20:37 +0000 |
commit | 457d83467c00c236e806bb150796a2efdc88bfcf (patch) | |
tree | 36c58186b34d36300374b232fb79540457307b23 /chrome/renderer/media/ipc_video_renderer.h | |
parent | 77a397cc5cf8106e559aa87a5228478afc28cec1 (diff) | |
download | chromium_src-457d83467c00c236e806bb150796a2efdc88bfcf.zip chromium_src-457d83467c00c236e806bb150796a2efdc88bfcf.tar.gz chromium_src-457d83467c00c236e806bb150796a2efdc88bfcf.tar.bz2 |
Terminate FilterFactory and his nasty friends
FilterFactory, IsMediaFormatSupported and CreateFactory are the source
of evil. They also have have a gang of template functions. This patch
terminate them all and make the world a better place.
BUG=28207
TEST=<video> runs
Review URL: http://codereview.chromium.org/3878001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/media/ipc_video_renderer.h')
-rw-r--r-- | chrome/renderer/media/ipc_video_renderer.h | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/chrome/renderer/media/ipc_video_renderer.h b/chrome/renderer/media/ipc_video_renderer.h index c934291..d032469 100644 --- a/chrome/renderer/media/ipc_video_renderer.h +++ b/chrome/renderer/media/ipc_video_renderer.h @@ -22,7 +22,12 @@ class IPCVideoRenderer : public webkit_glue::WebVideoRenderer { public: + explicit IPCVideoRenderer(int routing_id); + virtual ~IPCVideoRenderer(); + // WebVideoRenderer implementation. + virtual void SetWebMediaPlayerImplProxy( + webkit_glue::WebMediaPlayerImpl::Proxy* proxy); virtual void SetRect(const gfx::Rect& rect); virtual void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect); @@ -30,33 +35,6 @@ class IPCVideoRenderer : public webkit_glue::WebVideoRenderer { void OnUpdateVideoAck(); void OnDestroyVideo(); - // Static method for creating factory for this object. - static media::FilterFactory* CreateFactory( - webkit_glue::WebMediaPlayerImpl::Proxy* proxy, - int routing_id); - - // FilterFactoryImpl2 implementation. - static bool IsMediaFormatSupported(const media::MediaFormat& media_format); - - // TODO(scherkus): remove this mega-hack, see http://crbug.com/28207 - class FactoryFactory : public webkit_glue::WebVideoRendererFactoryFactory { - public: - explicit FactoryFactory(int routing_id) - : webkit_glue::WebVideoRendererFactoryFactory(), - routing_id_(routing_id) { - } - - virtual media::FilterFactory* CreateFactory( - webkit_glue::WebMediaPlayerImpl::Proxy* proxy) { - return IPCVideoRenderer::CreateFactory(proxy, routing_id_); - } - - private: - int routing_id_; - - DISALLOW_COPY_AND_ASSIGN(FactoryFactory); - }; - protected: // VideoRendererBase implementation. virtual bool OnInitialize(media::VideoDecoder* decoder); @@ -64,15 +42,6 @@ class IPCVideoRenderer : public webkit_glue::WebVideoRenderer { virtual void OnFrameAvailable(); private: - // Only the filter factories can create instances. - friend class media::FilterFactoryImpl2< - IPCVideoRenderer, - webkit_glue::WebMediaPlayerImpl::Proxy*, - int>; - IPCVideoRenderer(webkit_glue::WebMediaPlayerImpl::Proxy* proxy, - int routing_id); - virtual ~IPCVideoRenderer(); - // Send an IPC message to the browser process. The routing ID of the message // is assumed to match |routing_id_|. void Send(IPC::Message* msg); |