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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2507 new RendererGpuVideoDecoderFactories( | 2508 new RendererGpuVideoDecoderFactories( |
2508 gpu_channel_host, factories_loop, context3d))); | 2509 gpu_channel_host, factories_loop, context3d))); |
2509 } | 2510 } |
2510 | 2511 |
2511 WebMediaPlayer* media_player = | 2512 WebMediaPlayer* media_player = |
2512 content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( | 2513 content::GetContentClient()->renderer()->OverrideCreateWebMediaPlayer( |
2513 this, frame, client, AsWeakPtr(), collection, audio_source_provider, | 2514 this, frame, client, AsWeakPtr(), collection, audio_source_provider, |
2514 audio_source_provider, message_loop_factory, media_stream_impl_, | 2515 audio_source_provider, message_loop_factory, media_stream_impl_, |
2515 render_media_log); | 2516 render_media_log); |
2516 if (!media_player) { | 2517 if (!media_player) { |
2517 media_player = new webkit_media::WebMediaPlayerImpl( | 2518 EnsureMediaStreamImpl(); |
2518 frame, client, AsWeakPtr(), collection, audio_source_provider, | 2519 if (media_stream_impl_ && media_stream_impl_->IsMediaStream(url)) { |
scherkus (not reviewing)
2012/09/07 11:44:03
despite calling EnsureMediaStreamImpl() we still n
scherkus (not reviewing)
2012/09/07 11:44:03
You should disable this new code path here instead
wjia(left Chromium)
2012/09/13 01:22:07
yes, inside EnsureMediaStreamImpl(), the creation
wjia(left Chromium)
2012/09/13 01:22:07
Done.
| |
2519 audio_source_provider, message_loop_factory, media_stream_impl_, | 2520 media_player = new webkit_media::WebMediaPlayerMS( |
scherkus (not reviewing)
2012/09/07 11:44:03
this can be an early return
wjia(left Chromium)
2012/09/13 01:22:07
Done.
| |
2520 render_media_log); | 2521 frame, client, AsWeakPtr(), media_stream_impl_, render_media_log); |
2522 } else { | |
2523 media_player = new webkit_media::WebMediaPlayerImpl( | |
2524 frame, client, AsWeakPtr(), collection, audio_source_provider, | |
2525 audio_source_provider, message_loop_factory, media_stream_impl_, | |
2526 render_media_log); | |
2527 } | |
2521 } | 2528 } |
2522 return media_player; | 2529 return media_player; |
2523 } | 2530 } |
2524 | 2531 |
2525 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( | 2532 WebApplicationCacheHost* RenderViewImpl::createApplicationCacheHost( |
2526 WebFrame* frame, WebApplicationCacheHostClient* client) { | 2533 WebFrame* frame, WebApplicationCacheHostClient* client) { |
2527 if (!frame || !frame->view()) | 2534 if (!frame || !frame->view()) |
2528 return NULL; | 2535 return NULL; |
2529 return new RendererWebApplicationCacheHostImpl( | 2536 return new RendererWebApplicationCacheHostImpl( |
2530 FromWebView(frame->view()), client, | 2537 FromWebView(frame->view()), client, |
(...skipping 3528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6059 | 6066 |
6060 updating_frame_tree_ = true; | 6067 updating_frame_tree_ = true; |
6061 active_frame_id_map_.clear(); | 6068 active_frame_id_map_.clear(); |
6062 | 6069 |
6063 target_process_id_ = process_id; | 6070 target_process_id_ = process_id; |
6064 target_routing_id_ = route_id; | 6071 target_routing_id_ = route_id; |
6065 CreateFrameTree(webview()->mainFrame(), frames); | 6072 CreateFrameTree(webview()->mainFrame(), frames); |
6066 | 6073 |
6067 updating_frame_tree_ = false; | 6074 updating_frame_tree_ = false; |
6068 } | 6075 } |
OLD | NEW |