diff options
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r-- | webkit/tools/test_shell/test_shell.gypi | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 29 |
2 files changed, 25 insertions, 6 deletions
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi index 728ae77..935cbae 100644 --- a/webkit/tools/test_shell/test_shell.gypi +++ b/webkit/tools/test_shell/test_shell.gypi @@ -398,8 +398,6 @@ '../../glue/media/simple_data_source_unittest.cc', '../../glue/mimetype_unittest.cc', '../../glue/mock_resource_loader_bridge.h', - '../../glue/mock_webframe.h', - '../../glue/mock_weburlloader_impl.h', '../../glue/multipart_response_delegate_unittest.cc', '../../glue/plugins/plugin_group_unittest.cc', '../../glue/plugins/plugin_lib_unittest.cc', diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index cd95bad..50541cd 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -729,9 +729,27 @@ WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( 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(frame->url()), // 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(frame->url()), // 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)); @@ -739,7 +757,10 @@ WebMediaPlayer* TestWebViewDelegate::createMediaPlayer( 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(); |