| 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 return new WebPluginImplWithPageDelegate( | 264 return new WebPluginImplWithPageDelegate( |
| 265 frame, params, info.path, actual_mime_type); | 265 frame, params, info.path, actual_mime_type); |
| 266 } | 266 } |
| 267 | 267 |
| 268 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, | 268 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, |
| 269 WebMediaPlayerClient* client) { | 269 WebMediaPlayerClient* client) { |
| 270 scoped_ptr<media::FilterCollection> collection( | 270 scoped_ptr<media::FilterCollection> collection( |
| 271 new media::FilterCollection()); | 271 new media::FilterCollection()); |
| 272 | 272 |
| 273 // TODO(annacc): do we still need appcache_host? http://crbug.com/65135 | 273 appcache::WebApplicationCacheHostImpl* appcache_host = |
| 274 // appcache::WebApplicationCacheHostImpl* appcache_host = | 274 appcache::WebApplicationCacheHostImpl::FromFrame(frame); |
| 275 // appcache::WebApplicationCacheHostImpl::FromFrame(frame); | 275 |
| 276 // TODO(hclam): this is the same piece of code as in RenderView, maybe they |
| 277 // should be grouped together. |
| 278 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_simple = |
| 279 new webkit_glue::MediaResourceLoaderBridgeFactory( |
| 280 GURL(), // referrer |
| 281 "null", // frame origin |
| 282 "null", // main_frame_origin |
| 283 base::GetCurrentProcId(), |
| 284 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, |
| 285 0); |
| 286 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_buffered = |
| 287 new webkit_glue::MediaResourceLoaderBridgeFactory( |
| 288 GURL(), // referrer |
| 289 "null", // frame origin |
| 290 "null", // main_frame_origin |
| 291 base::GetCurrentProcId(), |
| 292 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, |
| 293 0); |
| 276 | 294 |
| 277 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 295 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
| 278 new webkit_glue::VideoRendererImpl(false)); | 296 new webkit_glue::VideoRendererImpl(false)); |
| 279 collection->AddVideoRenderer(video_renderer); | 297 collection->AddVideoRenderer(video_renderer); |
| 280 | 298 |
| 281 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( | 299 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( |
| 282 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); | 300 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); |
| 283 if (!result->Initialize(frame, false, video_renderer)) { | 301 if (!result->Initialize(bridge_factory_simple, |
| 302 bridge_factory_buffered, |
| 303 false, |
| 304 video_renderer)) { |
| 284 return NULL; | 305 return NULL; |
| 285 } | 306 } |
| 286 return result.release(); | 307 return result.release(); |
| 287 } | 308 } |
| 288 | 309 |
| 289 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 310 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
| 290 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { | 311 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
| 291 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 312 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
| 292 } | 313 } |
| 293 | 314 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 552 |
| 532 // FileSystem | 553 // FileSystem |
| 533 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 554 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
| 534 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 555 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
| 535 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 556 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
| 536 test_environment->webkit_client()->fileSystem()); | 557 test_environment->webkit_client()->fileSystem()); |
| 537 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 558 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
| 538 } | 559 } |
| 539 | 560 |
| 540 } // namespace webkit_support | 561 } // namespace webkit_support |
| OLD | NEW |