diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 01:49:16 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-03 01:49:16 +0000 |
commit | 8f2bf64884944e8b770852240e34e79f117acbb6 (patch) | |
tree | e7235339bc556dc5f933b75578cb12ca8f2ce905 /webkit/support | |
parent | ebc34fab52eabbb680eee966bb10e8f8a8cbd845 (diff) | |
download | chromium_src-8f2bf64884944e8b770852240e34e79f117acbb6.zip chromium_src-8f2bf64884944e8b770852240e34e79f117acbb6.tar.gz chromium_src-8f2bf64884944e8b770852240e34e79f117acbb6.tar.bz2 |
Revert 68094 - Refactoring BufferedDataSource to work with WebURLLoader instead of a MediaResourceLoaderBridge.
One thing to notice is that both buffered_data_source_unittest and simple_data_source_unittest need to have a way to inject a MockWebURLLoader into the BufferedResourceLoader and the SimpleDataSource. In order to make sure a new one is not created during a Start(), I introduced the function SetURLLoaderForTest and keep_test_loader flag.
Patch by annacc@chromium.org:
http://codereview.chromium.org/3863002/
BUG=16751
TEST=src/xcodebuild/Debug/test_shell_tests --gtest_filter=Buffered*
src/xcodebuild/Debug/test_shell_tests --gtest_filter=Simple*
src/webkit/tools/layout_tests/run_webkit_tests.sh --debug media
webkit/tools/layout_tests/run_webkit_tests.sh --debug http/tests/media
TBR=scherkus@chromium.org
Review URL: http://codereview.chromium.org/5619002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/webkit_support.cc | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index 7183cdb..be3c88a 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -270,9 +270,27 @@ WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, scoped_ptr<media::FilterCollection> collection( new media::FilterCollection()); - // TODO(annacc): do we still need appcache_host? http://crbug.com/65135 - // appcache::WebApplicationCacheHostImpl* appcache_host = - // appcache::WebApplicationCacheHostImpl::FromFrame(frame); + appcache::WebApplicationCacheHostImpl* appcache_host = + appcache::WebApplicationCacheHostImpl::FromFrame(frame); + + // TODO(hclam): this is the same piece of code as in RenderView, maybe they + // should be grouped together. + webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_simple = + new webkit_glue::MediaResourceLoaderBridgeFactory( + GURL(), // referrer + "null", // frame origin + "null", // main_frame_origin + base::GetCurrentProcId(), + appcache_host ? appcache_host->host_id() : appcache::kNoHostId, + 0); + webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_buffered = + new webkit_glue::MediaResourceLoaderBridgeFactory( + GURL(), // referrer + "null", // frame origin + "null", // main_frame_origin + base::GetCurrentProcId(), + appcache_host ? appcache_host->host_id() : appcache::kNoHostId, + 0); scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( new webkit_glue::VideoRendererImpl(false)); @@ -280,7 +298,10 @@ WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( new webkit_glue::WebMediaPlayerImpl(client, collection.release())); - if (!result->Initialize(frame, false, video_renderer)) { + if (!result->Initialize(bridge_factory_simple, + bridge_factory_buffered, + false, + video_renderer)) { return NULL; } return result.release(); |