| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
| 6 | 6 |
| 7 #include "app/gfx/gl/gl_implementation.h" | 7 #include "app/gfx/gl/gl_implementation.h" |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "media/base/filter_collection.h" | 27 #include "media/base/filter_collection.h" |
| 28 #include "net/base/escape.h" | 28 #include "net/base/escape.h" |
| 29 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
| 30 #include "net/base/net_util.h" | 30 #include "net/base/net_util.h" |
| 31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
| 32 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h" | 32 #include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h" |
| 33 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" | 33 #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" |
| 34 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" | 34 #include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" |
| 35 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" | 35 #include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" |
| 36 #include "webkit/appcache/web_application_cache_host_impl.h" | 36 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 37 #include "webkit/glue/media/buffered_data_source.h" | |
| 38 #include "webkit/glue/media/media_resource_loader_bridge_factory.h" | |
| 39 #include "webkit/glue/media/simple_data_source.h" | |
| 40 #include "webkit/glue/media/video_renderer_impl.h" | 37 #include "webkit/glue/media/video_renderer_impl.h" |
| 41 #include "webkit/glue/plugins/plugin_list.h" | 38 #include "webkit/glue/plugins/plugin_list.h" |
| 42 #include "webkit/glue/plugins/webplugin_impl.h" | 39 #include "webkit/glue/plugins/webplugin_impl.h" |
| 43 #include "webkit/glue/plugins/webplugin_page_delegate.h" | 40 #include "webkit/glue/plugins/webplugin_page_delegate.h" |
| 44 #include "webkit/glue/plugins/webplugininfo.h" | 41 #include "webkit/glue/plugins/webplugininfo.h" |
| 45 #include "webkit/glue/webkit_glue.h" | 42 #include "webkit/glue/webkit_glue.h" |
| 46 #include "webkit/glue/webkitclient_impl.h" | 43 #include "webkit/glue/webkitclient_impl.h" |
| 47 #include "webkit/glue/webmediaplayer_impl.h" | 44 #include "webkit/glue/webmediaplayer_impl.h" |
| 48 #include "webkit/support/platform_support.h" | 45 #include "webkit/support/platform_support.h" |
| 49 #include "webkit/support/test_webplugin_page_delegate.h" | 46 #include "webkit/support/test_webplugin_page_delegate.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 260 |
| 264 return new WebPluginImplWithPageDelegate( | 261 return new WebPluginImplWithPageDelegate( |
| 265 frame, params, info.path, actual_mime_type); | 262 frame, params, info.path, actual_mime_type); |
| 266 } | 263 } |
| 267 | 264 |
| 268 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, | 265 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, |
| 269 WebMediaPlayerClient* client) { | 266 WebMediaPlayerClient* client) { |
| 270 scoped_ptr<media::FilterCollection> collection( | 267 scoped_ptr<media::FilterCollection> collection( |
| 271 new media::FilterCollection()); | 268 new media::FilterCollection()); |
| 272 | 269 |
| 273 // TODO(annacc): do we still need appcache_host? http://crbug.com/65135 | |
| 274 // appcache::WebApplicationCacheHostImpl* appcache_host = | |
| 275 // appcache::WebApplicationCacheHostImpl::FromFrame(frame); | |
| 276 | |
| 277 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 270 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
| 278 new webkit_glue::VideoRendererImpl(false)); | 271 new webkit_glue::VideoRendererImpl(false)); |
| 279 collection->AddVideoRenderer(video_renderer); | 272 collection->AddVideoRenderer(video_renderer); |
| 280 | 273 |
| 281 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( | 274 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( |
| 282 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); | 275 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); |
| 283 if (!result->Initialize(frame, false, video_renderer)) { | 276 if (!result->Initialize(frame, false, video_renderer)) { |
| 284 return NULL; | 277 return NULL; |
| 285 } | 278 } |
| 286 return result.release(); | 279 return result.release(); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 524 |
| 532 // FileSystem | 525 // FileSystem |
| 533 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 526 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
| 534 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 527 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
| 535 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 528 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
| 536 test_environment->webkit_client()->fileSystem()); | 529 test_environment->webkit_client()->fileSystem()); |
| 537 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 530 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
| 538 } | 531 } |
| 539 | 532 |
| 540 } // namespace webkit_support | 533 } // namespace webkit_support |
| OLD | NEW |