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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 } | 2642 } |
2643 | 2643 |
2644 WebMediaPlayer* media_player = | 2644 WebMediaPlayer* media_player = |
2645 content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 2645 content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( |
2646 this, frame, client, AsWeakPtr(), collection, audio_source_provider, | 2646 this, frame, client, AsWeakPtr(), collection, audio_source_provider, |
2647 audio_source_provider, message_loop_factory, media_stream_impl_, | 2647 audio_source_provider, message_loop_factory, media_stream_impl_, |
2648 render_media_log); | 2648 render_media_log); |
2649 if (!media_player) { | 2649 if (!media_player) { |
2650 // TODO(wjia): when all patches related to WebMediaPlayerMS have been | 2650 // TODO(wjia): when all patches related to WebMediaPlayerMS have been |
2651 // landed, remove the switch. Refer to crbug.com/142988. | 2651 // landed, remove the switch. Refer to crbug.com/142988. |
2652 if (cmd_line->HasSwitch(switches::kEnableWebMediaPlayerMS)) { | 2652 if (!cmd_line->HasSwitch(switches::kDisableWebMediaPlayerMS) && |
| 2653 MediaStreamImpl::CheckMediaStream(url)) { |
2653 EnsureMediaStreamImpl(); | 2654 EnsureMediaStreamImpl(); |
2654 if (media_stream_impl_ && media_stream_impl_->IsMediaStream(url)) { | 2655 return new webkit_media::WebMediaPlayerMS( |
2655 return new webkit_media::WebMediaPlayerMS( | 2656 frame, client, AsWeakPtr(), media_stream_impl_, render_media_log); |
2656 frame, client, AsWeakPtr(), media_stream_impl_, render_media_log); | |
2657 } | |
2658 } | 2657 } |
2659 | 2658 |
2660 media_player = new webkit_media::WebMediaPlayerImpl( | 2659 media_player = new webkit_media::WebMediaPlayerImpl( |
2661 frame, client, AsWeakPtr(), collection, audio_source_provider, | 2660 frame, client, AsWeakPtr(), collection, audio_source_provider, |
2662 audio_source_provider, message_loop_factory, media_stream_impl_, | 2661 audio_source_provider, message_loop_factory, media_stream_impl_, |
2663 render_media_log); | 2662 render_media_log); |
2664 } | 2663 } |
2665 return media_player; | 2664 return media_player; |
2666 } | 2665 } |
2667 | 2666 |
(...skipping 3682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6350 | 6349 |
6351 updating_frame_tree_ = true; | 6350 updating_frame_tree_ = true; |
6352 active_frame_id_map_.clear(); | 6351 active_frame_id_map_.clear(); |
6353 | 6352 |
6354 target_process_id_ = process_id; | 6353 target_process_id_ = process_id; |
6355 target_routing_id_ = route_id; | 6354 target_routing_id_ = route_id; |
6356 CreateFrameTree(webview()->mainFrame(), frames); | 6355 CreateFrameTree(webview()->mainFrame(), frames); |
6357 | 6356 |
6358 updating_frame_tree_ = false; | 6357 updating_frame_tree_ = false; |
6359 } | 6358 } |
OLD | NEW |