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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10918052: create a separate WebMediaPlayer for URL derived from media stream (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: code review 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 "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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 #include "webkit/glue/alt_error_page_resource_fetcher.h" 185 #include "webkit/glue/alt_error_page_resource_fetcher.h"
186 #include "webkit/glue/dom_operations.h" 186 #include "webkit/glue/dom_operations.h"
187 #include "webkit/glue/glue_serialize.h" 187 #include "webkit/glue/glue_serialize.h"
188 #include "webkit/glue/web_intent_service_data.h" 188 #include "webkit/glue/web_intent_service_data.h"
189 #include "webkit/glue/webdropdata.h" 189 #include "webkit/glue/webdropdata.h"
190 #include "webkit/glue/webkit_constants.h" 190 #include "webkit/glue/webkit_constants.h"
191 #include "webkit/glue/webkit_glue.h" 191 #include "webkit/glue/webkit_glue.h"
192 #include "webkit/glue/weburlresponse_extradata_impl.h" 192 #include "webkit/glue/weburlresponse_extradata_impl.h"
193 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 193 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
194 #include "webkit/media/webmediaplayer_impl.h" 194 #include "webkit/media/webmediaplayer_impl.h"
195 #include "webkit/media/webmediaplayer_ms.h"
195 #include "webkit/plugins/npapi/plugin_list.h" 196 #include "webkit/plugins/npapi/plugin_list.h"
196 #include "webkit/plugins/npapi/webplugin_delegate.h" 197 #include "webkit/plugins/npapi/webplugin_delegate.h"
197 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 198 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
198 #include "webkit/plugins/npapi/webplugin_impl.h" 199 #include "webkit/plugins/npapi/webplugin_impl.h"
199 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" 200 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
200 201
201 #if defined(OS_ANDROID) 202 #if defined(OS_ANDROID)
202 #include "content/common/android/device_info.h" 203 #include "content/common/android/device_info.h"
203 #include "content/renderer/android/address_detector.h" 204 #include "content/renderer/android/address_detector.h"
204 #include "content/renderer/android/content_detector.h" 205 #include "content/renderer/android/content_detector.h"
(...skipping 2311 matching lines...) Expand 10 before | Expand all | Expand 10 after
2516 new RendererGpuVideoDecoderFactories( 2517 new RendererGpuVideoDecoderFactories(
2517 gpu_channel_host, factories_loop, context3d))); 2518 gpu_channel_host, factories_loop, context3d)));
2518 } 2519 }
2519 2520
2520 WebMediaPlayer* media_player = 2521 WebMediaPlayer* media_player =
2521 content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( 2522 content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer(
2522 this, frame, client, AsWeakPtr(), collection, audio_source_provider, 2523 this, frame, client, AsWeakPtr(), collection, audio_source_provider,
2523 audio_source_provider, message_loop_factory, media_stream_impl_, 2524 audio_source_provider, message_loop_factory, media_stream_impl_,
2524 render_media_log); 2525 render_media_log);
2525 if (!media_player) { 2526 if (!media_player) {
2527 EnsureMediaStreamImpl();
2528 if (media_stream_impl_ && media_stream_impl_->IsMediaStream(url)) {
2529 // TODO(wjia): when all patches related to WebMediaPlayerMS have been
2530 // landed, uncomment the following code to switch to WebMediaPlayerMS
2531 // for media stream. Refer to crbug.com/142988.
2532 // return new webkit_media::WebMediaPlayerMS(
scherkus (not reviewing) 2012/09/13 10:22:43 instead of commented out code how about introducin
wjia(left Chromium) 2012/09/19 03:22:06 Done.
2533 // frame, client, AsWeakPtr(), media_stream_impl_, render_media_log);
2534 }
2535
2526 media_player = new webkit_media::WebMediaPlayerImpl( 2536 media_player = new webkit_media::WebMediaPlayerImpl(
2527 frame, client, AsWeakPtr(), collection, audio_source_provider, 2537 frame, client, AsWeakPtr(), collection, audio_source_provider,
2528 audio_source_provider, message_loop_factory, media_stream_impl_, 2538 audio_source_provider, message_loop_factory, media_stream_impl_,
2529 render_media_log); 2539 render_media_log);
2530 } 2540 }
2531 return media_player; 2541 return media_player;
2532 } 2542 }
2533 2543
2534 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( 2544 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost(
2535 WebFrame* frame, WebApplicationCacheHostClient* client) { 2545 WebFrame* frame, WebApplicationCacheHostClient* client) {
(...skipping 3583 matching lines...) Expand 10 before | Expand all | Expand 10 after
6119 6129
6120 updating_frame_tree_ = true; 6130 updating_frame_tree_ = true;
6121 active_frame_id_map_.clear(); 6131 active_frame_id_map_.clear();
6122 6132
6123 target_process_id_ = process_id; 6133 target_process_id_ = process_id;
6124 target_routing_id_ = route_id; 6134 target_routing_id_ = route_id;
6125 CreateFrameTree(webview()->mainFrame(), frames); 6135 CreateFrameTree(webview()->mainFrame(), frames);
6126 6136
6127 updating_frame_tree_ = false; 6137 updating_frame_tree_ = false;
6128 } 6138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698