| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 #if defined(OS_ANDROID) | 309 #if defined(OS_ANDROID) |
| 310 // TODO: Implement the WebMediaPlayer that will be used for Android. | 310 // TODO: Implement the WebMediaPlayer that will be used for Android. |
| 311 return NULL; | 311 return NULL; |
| 312 #else | 312 #else |
| 313 scoped_ptr<media::MessageLoopFactory> message_loop_factory( | 313 scoped_ptr<media::MessageLoopFactory> message_loop_factory( |
| 314 new media::MessageLoopFactoryImpl()); | 314 new media::MessageLoopFactoryImpl()); |
| 315 | 315 |
| 316 scoped_ptr<media::FilterCollection> collection( | 316 scoped_ptr<media::FilterCollection> collection( |
| 317 new media::FilterCollection()); | 317 new media::FilterCollection()); |
| 318 | 318 |
| 319 scoped_ptr<webkit_media::WebMediaPlayerImpl> result( | 319 webkit_media::WebMediaPlayerImpl* media_player = |
| 320 new webkit_media::WebMediaPlayerImpl( | 320 new webkit_media::WebMediaPlayerImpl( |
| 321 client, | 321 client, |
| 322 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), | 322 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), |
| 323 collection.release(), | 323 collection.release(), |
| 324 NULL, | 324 NULL, |
| 325 message_loop_factory.release(), | 325 message_loop_factory.release(), |
| 326 media_stream_client, | 326 media_stream_client, |
| 327 new media::MediaLog())); | 327 new media::MediaLog()); |
| 328 if (!result->Initialize(frame, false)) { | 328 media_player->Initialize(frame); |
| 329 return NULL; | 329 return media_player; |
| 330 } | |
| 331 return result.release(); | |
| 332 #endif | 330 #endif |
| 333 } | 331 } |
| 334 | 332 |
| 335 WebKit::WebMediaPlayer* CreateMediaPlayer( | 333 WebKit::WebMediaPlayer* CreateMediaPlayer( |
| 336 WebFrame* frame, | 334 WebFrame* frame, |
| 337 WebMediaPlayerClient* client) { | 335 WebMediaPlayerClient* client) { |
| 338 return CreateMediaPlayer(frame, client, NULL); | 336 return CreateMediaPlayer(frame, client, NULL); |
| 339 } | 337 } |
| 340 | 338 |
| 341 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( | 339 WebKit::WebApplicationCacheHost* CreateApplicationCacheHost( |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 // Logging | 649 // Logging |
| 652 void EnableWebCoreLogChannels(const std::string& channels) { | 650 void EnableWebCoreLogChannels(const std::string& channels) { |
| 653 webkit_glue::EnableWebCoreLogChannels(channels); | 651 webkit_glue::EnableWebCoreLogChannels(channels); |
| 654 } | 652 } |
| 655 | 653 |
| 656 void SetGamepadData(const WebKit::WebGamepads& pads) { | 654 void SetGamepadData(const WebKit::WebGamepads& pads) { |
| 657 test_environment->webkit_platform_support()->setGamepadData(pads); | 655 test_environment->webkit_platform_support()->setGamepadData(pads); |
| 658 } | 656 } |
| 659 | 657 |
| 660 } // namespace webkit_support | 658 } // namespace webkit_support |
| OLD | NEW |