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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 "null", // frame origin | 288 "null", // frame origin |
289 "null", // main_frame_origin | 289 "null", // main_frame_origin |
290 base::GetCurrentProcId(), | 290 base::GetCurrentProcId(), |
291 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, | 291 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, |
292 0); | 292 0); |
293 | 293 |
294 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 294 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
295 new webkit_glue::VideoRendererImpl(false)); | 295 new webkit_glue::VideoRendererImpl(false)); |
296 collection->AddVideoRenderer(video_renderer); | 296 collection->AddVideoRenderer(video_renderer); |
297 | 297 |
298 return new webkit_glue::WebMediaPlayerImpl( | 298 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( |
299 client, collection.release(), bridge_factory_simple, | 299 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); |
300 bridge_factory_buffered, false, video_renderer); | 300 if (!result->Initialize(bridge_factory_simple, |
| 301 bridge_factory_buffered, |
| 302 false, |
| 303 video_renderer)) { |
| 304 return NULL; |
| 305 } |
| 306 return result.release(); |
301 } | 307 } |
302 | 308 |
303 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 309 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
304 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { | 310 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
305 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 311 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
306 } | 312 } |
307 | 313 |
308 WebKit::WebString GetWebKitRootDir() { | 314 WebKit::WebString GetWebKitRootDir() { |
309 FilePath path = GetWebKitRootDirFilePath(); | 315 FilePath path = GetWebKitRootDirFilePath(); |
310 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); | 316 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 551 |
546 // FileSystem | 552 // FileSystem |
547 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 553 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
548 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 554 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
549 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 555 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
550 test_environment->webkit_client()->fileSystem()); | 556 test_environment->webkit_client()->fileSystem()); |
551 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 557 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
552 } | 558 } |
553 | 559 |
554 } // namespace webkit_support | 560 } // namespace webkit_support |
OLD | NEW |