| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 std::move(media_log), | 2983 std::move(media_log), |
| 2984 base::Bind(&ContentRendererClient::DeferMediaLoad, | 2984 base::Bind(&ContentRendererClient::DeferMediaLoad, |
| 2985 base::Unretained(GetContentClient()->renderer()), | 2985 base::Unretained(GetContentClient()->renderer()), |
| 2986 static_cast<RenderFrame*>(this), | 2986 static_cast<RenderFrame*>(this), |
| 2987 GetWebMediaPlayerDelegate()->has_played_media()), | 2987 GetWebMediaPlayerDelegate()->has_played_media()), |
| 2988 audio_renderer_sink, render_thread->GetMediaThreadTaskRunner(), | 2988 audio_renderer_sink, render_thread->GetMediaThreadTaskRunner(), |
| 2989 render_thread->GetWorkerTaskRunner(), | 2989 render_thread->GetWorkerTaskRunner(), |
| 2990 render_thread->compositor_task_runner(), context_3d_cb, | 2990 render_thread->compositor_task_runner(), context_3d_cb, |
| 2991 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, | 2991 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, |
| 2992 base::Unretained(blink::MainThreadIsolate())), | 2992 base::Unretained(blink::MainThreadIsolate())), |
| 2993 initial_cdm, media_surface_manager_, media_observer, | 2993 initial_cdm, media_surface_manager_, |
| 2994 max_keyframe_distance_to_disable_background_video, | 2994 base::Bind(&RenderFrameImpl::RequestOverlayRoutingToken, |
| 2995 base::Unretained(this)), |
| 2996 media_observer, max_keyframe_distance_to_disable_background_video, |
| 2995 max_keyframe_distance_to_disable_background_video_mse, | 2997 max_keyframe_distance_to_disable_background_video_mse, |
| 2996 GetWebkitPreferences().enable_instant_source_buffer_gc, | 2998 GetWebkitPreferences().enable_instant_source_buffer_gc, |
| 2997 GetContentClient()->renderer()->AllowMediaSuspend(), | 2999 GetContentClient()->renderer()->AllowMediaSuspend(), |
| 2998 embedded_media_experience_enabled)); | 3000 embedded_media_experience_enabled)); |
| 2999 | 3001 |
| 3000 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( | 3002 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( |
| 3001 frame_, client, encrypted_client, GetWebMediaPlayerDelegate(), | 3003 frame_, client, encrypted_client, GetWebMediaPlayerDelegate(), |
| 3002 std::move(factory_selector), url_index_, std::move(params)); | 3004 std::move(factory_selector), url_index_, std::move(params)); |
| 3003 | 3005 |
| 3004 #if defined(OS_ANDROID) // WMPI_CAST | 3006 #if defined(OS_ANDROID) // WMPI_CAST |
| (...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5964 | 5966 |
| 5965 void RenderFrameImpl::OnSetOverlayRoutingToken( | 5967 void RenderFrameImpl::OnSetOverlayRoutingToken( |
| 5966 const base::UnguessableToken& token) { | 5968 const base::UnguessableToken& token) { |
| 5967 overlay_routing_token_ = token; | 5969 overlay_routing_token_ = token; |
| 5968 for (const auto& cb : pending_routing_token_callbacks_) | 5970 for (const auto& cb : pending_routing_token_callbacks_) |
| 5969 cb.Run(overlay_routing_token_.value()); | 5971 cb.Run(overlay_routing_token_.value()); |
| 5970 pending_routing_token_callbacks_.clear(); | 5972 pending_routing_token_callbacks_.clear(); |
| 5971 } | 5973 } |
| 5972 | 5974 |
| 5973 void RenderFrameImpl::RequestOverlayRoutingToken( | 5975 void RenderFrameImpl::RequestOverlayRoutingToken( |
| 5974 const media::RoutingTokenCallback& callback) { | 5976 media::RoutingTokenCallback callback) { |
| 5975 if (overlay_routing_token_.has_value()) { | 5977 if (overlay_routing_token_.has_value()) { |
| 5976 callback.Run(overlay_routing_token_.value()); | 5978 callback.Run(overlay_routing_token_.value()); |
| 5977 return; | 5979 return; |
| 5978 } | 5980 } |
| 5979 | 5981 |
| 5980 // Send a request to the host for the token. We'll notify |callback| when it | 5982 // Send a request to the host for the token. We'll notify |callback| when it |
| 5981 // arrives later. | 5983 // arrives later. |
| 5982 Send(new FrameHostMsg_RequestOverlayRoutingToken(routing_id_)); | 5984 Send(new FrameHostMsg_RequestOverlayRoutingToken(routing_id_)); |
| 5983 | 5985 |
| 5984 pending_routing_token_callbacks_.push_back(callback); | 5986 pending_routing_token_callbacks_.push_back(callback); |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7105 policy(info.default_policy), | 7107 policy(info.default_policy), |
| 7106 replaces_current_history_item(info.replaces_current_history_item), | 7108 replaces_current_history_item(info.replaces_current_history_item), |
| 7107 history_navigation_in_new_child_frame( | 7109 history_navigation_in_new_child_frame( |
| 7108 info.is_history_navigation_in_new_child_frame), | 7110 info.is_history_navigation_in_new_child_frame), |
| 7109 client_redirect(info.is_client_redirect), | 7111 client_redirect(info.is_client_redirect), |
| 7110 cache_disabled(info.is_cache_disabled), | 7112 cache_disabled(info.is_cache_disabled), |
| 7111 form(info.form), | 7113 form(info.form), |
| 7112 source_location(info.source_location) {} | 7114 source_location(info.source_location) {} |
| 7113 | 7115 |
| 7114 } // namespace content | 7116 } // namespace content |
| OLD | NEW |