summaryrefslogtreecommitdiffstats
path: root/webkit/support/webkit_support.cc
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 05:40:13 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 05:40:13 +0000
commit9e166974e33f359467458af13987c3d87663c163 (patch)
tree63ddfaa99458d1d06b120ec99383f6ff814933da /webkit/support/webkit_support.cc
parentbcc26067bf9a0bb7fe1600119a5b034b36b86da4 (diff)
downloadchromium_src-9e166974e33f359467458af13987c3d87663c163.zip
chromium_src-9e166974e33f359467458af13987c3d87663c163.tar.gz
chromium_src-9e166974e33f359467458af13987c3d87663c163.tar.bz2
Move MediaFilterCollection code into a class.
Refactored FilterType usage a bit to remove the need to manually associate FilterType values to filter base classes. Patch by acolwell@chromium.org: http://codereview.chromium.org/4176006/show BUG=60778 TEST=media_unittests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/webkit_support.cc')
-rw-r--r--webkit/support/webkit_support.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index e2dbf4c..b80c0af 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -265,7 +265,8 @@ WebPlugin* CreateWebPlugin(WebFrame* frame,
WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame,
WebMediaPlayerClient* client) {
- media::MediaFilterCollection collection;
+ scoped_ptr<media::MediaFilterCollection> collection(
+ new media::MediaFilterCollection());
appcache::WebApplicationCacheHostImpl* appcache_host =
appcache::WebApplicationCacheHostImpl::FromFrame(frame);
@@ -291,11 +292,11 @@ WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame,
scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
new webkit_glue::VideoRendererImpl(false));
- collection.push_back(video_renderer);
+ collection->AddFilter(video_renderer);
return new webkit_glue::WebMediaPlayerImpl(
- client, collection, bridge_factory_simple, bridge_factory_buffered,
- false, video_renderer);
+ client, collection.release(), bridge_factory_simple,
+ bridge_factory_buffered, false, video_renderer);
}
WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(