Chromium Code Reviews| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 } | 260 } |
| 261 | 261 |
| 262 return new WebPluginImplWithPageDelegate( | 262 return new WebPluginImplWithPageDelegate( |
| 263 frame, params, info.path, actual_mime_type); | 263 frame, params, info.path, actual_mime_type); |
| 264 } | 264 } |
| 265 | 265 |
| 266 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, | 266 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, |
| 267 WebMediaPlayerClient* client) { | 267 WebMediaPlayerClient* client) { |
| 268 scoped_ptr<media::MediaFilterCollection> collection( | 268 scoped_ptr<media::MediaFilterCollection> collection( |
| 269 new media::MediaFilterCollection()); | 269 new media::MediaFilterCollection()); |
| 270 | 270 /* |
|
Alpha Left Google
2010/11/19 22:53:42
please add michaeln to look at this block.
| |
| 271 appcache::WebApplicationCacheHostImpl* appcache_host = | 271 appcache::WebApplicationCacheHostImpl* appcache_host = |
| 272 appcache::WebApplicationCacheHostImpl::FromFrame(frame); | 272 appcache::WebApplicationCacheHostImpl::FromFrame(frame); |
| 273 | 273 */ |
| 274 // TODO(hclam): this is the same piece of code as in RenderView, maybe they | |
| 275 // should be grouped together. | |
| 276 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_simple = | |
| 277 new webkit_glue::MediaResourceLoaderBridgeFactory( | |
| 278 GURL(), // referrer | |
| 279 "null", // frame origin | |
| 280 "null", // main_frame_origin | |
| 281 base::GetCurrentProcId(), | |
| 282 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, | |
| 283 0); | |
| 284 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory_buffered = | |
| 285 new webkit_glue::MediaResourceLoaderBridgeFactory( | |
| 286 GURL(), // referrer | |
| 287 "null", // frame origin | |
| 288 "null", // main_frame_origin | |
| 289 base::GetCurrentProcId(), | |
| 290 appcache_host ? appcache_host->host_id() : appcache::kNoHostId, | |
| 291 0); | |
| 292 | |
| 293 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( | 274 scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( |
| 294 new webkit_glue::VideoRendererImpl(false)); | 275 new webkit_glue::VideoRendererImpl(false)); |
| 295 collection->AddVideoRenderer(video_renderer); | 276 collection->AddVideoRenderer(video_renderer); |
| 296 | 277 |
| 297 return new webkit_glue::WebMediaPlayerImpl( | 278 return new webkit_glue::WebMediaPlayerImpl( |
| 298 client, collection.release(), bridge_factory_simple, | 279 client, collection.release(), frame, |
| 299 bridge_factory_buffered, false, video_renderer); | 280 false, video_renderer); |
| 300 } | 281 } |
| 301 | 282 |
| 302 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 283 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
| 303 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { | 284 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
| 304 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 285 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
| 305 } | 286 } |
| 306 | 287 |
| 307 WebKit::WebString GetWebKitRootDir() { | 288 WebKit::WebString GetWebKitRootDir() { |
| 308 FilePath path = GetWebKitRootDirFilePath(); | 289 FilePath path = GetWebKitRootDirFilePath(); |
| 309 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); | 290 return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str()); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 551 callbacks->didFail(WebKit::WebFileErrorSecurity); | 532 callbacks->didFail(WebKit::WebFileErrorSecurity); |
| 552 } else { | 533 } else { |
| 553 callbacks->didOpenFileSystem( | 534 callbacks->didOpenFileSystem( |
| 554 "TestShellFileSystem", | 535 "TestShellFileSystem", |
| 555 webkit_glue::FilePathToWebString( | 536 webkit_glue::FilePathToWebString( |
| 556 test_environment->webkit_client()->file_system_root())); | 537 test_environment->webkit_client()->file_system_root())); |
| 557 } | 538 } |
| 558 } | 539 } |
| 559 | 540 |
| 560 } // namespace webkit_support | 541 } // namespace webkit_support |
| OLD | NEW |