Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: webkit/support/webkit_support.cc

Issue 10918052: create a separate WebMediaPlayer for URL derived from media stream (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix win build Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "webkit/glue/webkit_constants.h" 54 #include "webkit/glue/webkit_constants.h"
55 #include "webkit/glue/webkit_glue.h" 55 #include "webkit/glue/webkit_glue.h"
56 #include "webkit/glue/webkitplatformsupport_impl.h" 56 #include "webkit/glue/webkitplatformsupport_impl.h"
57 #include "webkit/glue/weburlrequest_extradata_impl.h" 57 #include "webkit/glue/weburlrequest_extradata_impl.h"
58 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" 58 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
59 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 59 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
60 #if defined(OS_ANDROID) 60 #if defined(OS_ANDROID)
61 #include "webkit/media/android/webmediaplayer_android.h" 61 #include "webkit/media/android/webmediaplayer_android.h"
62 #include "webkit/media/android/webmediaplayer_manager_android.h" 62 #include "webkit/media/android/webmediaplayer_manager_android.h"
63 #endif 63 #endif
64 #include "webkit/media/media_stream_client.h"
64 #include "webkit/media/webmediaplayer_impl.h" 65 #include "webkit/media/webmediaplayer_impl.h"
66 #include "webkit/media/webmediaplayer_ms.h"
65 #include "webkit/plugins/npapi/plugin_list.h" 67 #include "webkit/plugins/npapi/plugin_list.h"
66 #include "webkit/plugins/npapi/webplugin_impl.h" 68 #include "webkit/plugins/npapi/webplugin_impl.h"
67 #include "webkit/plugins/npapi/webplugin_page_delegate.h" 69 #include "webkit/plugins/npapi/webplugin_page_delegate.h"
68 #include "webkit/plugins/webplugininfo.h" 70 #include "webkit/plugins/webplugininfo.h"
69 #include "webkit/support/platform_support.h" 71 #include "webkit/support/platform_support.h"
70 #include "webkit/support/simple_database_system.h" 72 #include "webkit/support/simple_database_system.h"
71 #include "webkit/support/test_webkit_platform_support.h" 73 #include "webkit/support/test_webkit_platform_support.h"
72 #include "webkit/support/test_webplugin_page_delegate.h" 74 #include "webkit/support/test_webplugin_page_delegate.h"
73 #include "webkit/tools/test_shell/simple_appcache_system.h" 75 #include "webkit/tools/test_shell/simple_appcache_system.h"
74 #include "webkit/tools/test_shell/simple_dom_storage_system.h" 76 #include "webkit/tools/test_shell/simple_dom_storage_system.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 GetWebKitPlatformSupport()->cookieJar(), 395 GetWebKitPlatformSupport()->cookieJar(),
394 test_environment->media_player_manager(), 396 test_environment->media_player_manager(),
395 new webkit_support::TestStreamTextureFactory()); 397 new webkit_support::TestStreamTextureFactory());
396 #else 398 #else
397 scoped_ptr<media::MessageLoopFactory> message_loop_factory( 399 scoped_ptr<media::MessageLoopFactory> message_loop_factory(
398 new media::MessageLoopFactory()); 400 new media::MessageLoopFactory());
399 401
400 scoped_ptr<media::FilterCollection> collection( 402 scoped_ptr<media::FilterCollection> collection(
401 new media::FilterCollection()); 403 new media::FilterCollection());
402 404
403 return new webkit_media::WebMediaPlayerImpl( 405 if (media_stream_client && media_stream_client->IsMediaStream(url)) {
404 frame, 406 return new webkit_media::WebMediaPlayerMS(
405 client, 407 frame,
406 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(), 408 client,
407 collection.release(), 409 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(),
408 NULL, 410 media_stream_client,
409 NULL, 411 new media::MediaLog());
410 message_loop_factory.release(), 412 } else {
scherkus (not reviewing) 2012/09/07 11:44:03 no need for else
wjia(left Chromium) 2012/09/13 01:22:07 Done.
411 media_stream_client, 413 return new webkit_media::WebMediaPlayerImpl(
412 new media::MediaLog()); 414 frame,
415 client,
416 base::WeakPtr<webkit_media::WebMediaPlayerDelegate>(),
417 collection.release(),
418 NULL,
419 NULL,
420 message_loop_factory.release(),
421 media_stream_client,
422 new media::MediaLog());
423 }
413 #endif 424 #endif
414 } 425 }
415 426
416 WebKit::WebMediaPlayer* CreateMediaPlayer( 427 WebKit::WebMediaPlayer* CreateMediaPlayer(
417 WebFrame* frame, 428 WebFrame* frame,
418 const WebURL& url, 429 const WebURL& url,
419 WebMediaPlayerClient* client) { 430 WebMediaPlayerClient* client) {
420 return CreateMediaPlayer(frame, url, client, NULL); 431 return CreateMediaPlayer(frame, url, client, NULL);
421 } 432 }
422 433
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 // Logging 852 // Logging
842 void EnableWebCoreLogChannels(const std::string& channels) { 853 void EnableWebCoreLogChannels(const std::string& channels) {
843 webkit_glue::EnableWebCoreLogChannels(channels); 854 webkit_glue::EnableWebCoreLogChannels(channels);
844 } 855 }
845 856
846 void SetGamepadData(const WebKit::WebGamepads& pads) { 857 void SetGamepadData(const WebKit::WebGamepads& pads) {
847 test_environment->webkit_platform_support()->setGamepadData(pads); 858 test_environment->webkit_platform_support()->setGamepadData(pads);
848 } 859 }
849 860
850 } // namespace webkit_support 861 } // namespace webkit_support
OLDNEW
« webkit/support/test_media_stream_client.h ('K') | « webkit/support/test_media_stream_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698