OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 return NULL; | 376 return NULL; |
377 | 377 |
378 WebPluginParams new_params = params; | 378 WebPluginParams new_params = params; |
379 new_params.mimeType = WebString::fromUTF8(mime_types.front()); | 379 new_params.mimeType = WebString::fromUTF8(mime_types.front()); |
380 return new WebPluginImplWithPageDelegate( | 380 return new WebPluginImplWithPageDelegate( |
381 frame, new_params, plugins.front().path); | 381 frame, new_params, plugins.front().path); |
382 } | 382 } |
383 | 383 |
384 WebKit::WebMediaPlayer* CreateMediaPlayer( | 384 WebKit::WebMediaPlayer* CreateMediaPlayer( |
385 WebFrame* frame, | 385 WebFrame* frame, |
| 386 const WebURL& url, |
| 387 WebMediaPlayerClient* client, |
| 388 webkit_media::MediaStreamClient* media_stream_client) { |
| 389 return CreateMediaPlayer(frame, client, media_stream_client); |
| 390 } |
| 391 |
| 392 WebKit::WebMediaPlayer* CreateMediaPlayer( |
| 393 WebFrame* frame, |
386 WebMediaPlayerClient* client, | 394 WebMediaPlayerClient* client, |
387 webkit_media::MediaStreamClient* media_stream_client) { | 395 webkit_media::MediaStreamClient* media_stream_client) { |
388 #if defined(OS_ANDROID) | 396 #if defined(OS_ANDROID) |
389 return new webkit_media::WebMediaPlayerAndroid( | 397 return new webkit_media::WebMediaPlayerAndroid( |
390 frame, | 398 frame, |
391 client, | 399 client, |
392 GetWebKitPlatformSupport()->cookieJar(), | 400 GetWebKitPlatformSupport()->cookieJar(), |
393 test_environment->media_player_manager(), | 401 test_environment->media_player_manager(), |
394 new webkit_support::TestStreamTextureFactory()); | 402 new webkit_support::TestStreamTextureFactory()); |
395 #else | 403 #else |
(...skipping 15 matching lines...) Expand all Loading... |
411 new media::MediaLog()); | 419 new media::MediaLog()); |
412 #endif | 420 #endif |
413 } | 421 } |
414 | 422 |
415 WebKit::WebMediaPlayer* CreateMediaPlayer( | 423 WebKit::WebMediaPlayer* CreateMediaPlayer( |
416 WebFrame* frame, | 424 WebFrame* frame, |
417 WebMediaPlayerClient* client) { | 425 WebMediaPlayerClient* client) { |
418 return CreateMediaPlayer(frame, client, NULL); | 426 return CreateMediaPlayer(frame, client, NULL); |
419 } | 427 } |
420 | 428 |
| 429 WebKit::WebMediaPlayer* CreateMediaPlayer( |
| 430 WebFrame* frame, |
| 431 const WebURL& url, |
| 432 WebMediaPlayerClient* client) { |
| 433 return CreateMediaPlayer(frame, url, client, NULL); |
| 434 } |
| 435 |
421 #if defined(OS_ANDROID) | 436 #if defined(OS_ANDROID) |
422 void ReleaseMediaResources() { | 437 void ReleaseMediaResources() { |
423 test_environment->media_player_manager()->ReleaseMediaResources(); | 438 test_environment->media_player_manager()->ReleaseMediaResources(); |
424 } | 439 } |
425 #endif | 440 #endif |
426 | 441 |
427 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 442 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
428 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { | 443 WebFrame*, WebKit::WebApplicationCacheHostClient* client) { |
429 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); | 444 return SimpleAppCacheSystem::CreateApplicationCacheHost(client); |
430 } | 445 } |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 // Logging | 847 // Logging |
833 void EnableWebCoreLogChannels(const std::string& channels) { | 848 void EnableWebCoreLogChannels(const std::string& channels) { |
834 webkit_glue::EnableWebCoreLogChannels(channels); | 849 webkit_glue::EnableWebCoreLogChannels(channels); |
835 } | 850 } |
836 | 851 |
837 void SetGamepadData(const WebKit::WebGamepads& pads) { | 852 void SetGamepadData(const WebKit::WebGamepads& pads) { |
838 test_environment->webkit_platform_support()->setGamepadData(pads); | 853 test_environment->webkit_platform_support()->setGamepadData(pads); |
839 } | 854 } |
840 | 855 |
841 } // namespace webkit_support | 856 } // namespace webkit_support |
OLD | NEW |