| 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 2956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2967 std::move(media_log), | 2967 std::move(media_log), |
| 2968 base::Bind(&ContentRendererClient::DeferMediaLoad, | 2968 base::Bind(&ContentRendererClient::DeferMediaLoad, |
| 2969 base::Unretained(GetContentClient()->renderer()), | 2969 base::Unretained(GetContentClient()->renderer()), |
| 2970 static_cast<RenderFrame*>(this), | 2970 static_cast<RenderFrame*>(this), |
| 2971 GetWebMediaPlayerDelegate()->has_played_media()), | 2971 GetWebMediaPlayerDelegate()->has_played_media()), |
| 2972 audio_renderer_sink, render_thread->GetMediaThreadTaskRunner(), | 2972 audio_renderer_sink, render_thread->GetMediaThreadTaskRunner(), |
| 2973 render_thread->GetWorkerTaskRunner(), | 2973 render_thread->GetWorkerTaskRunner(), |
| 2974 render_thread->compositor_task_runner(), context_3d_cb, | 2974 render_thread->compositor_task_runner(), context_3d_cb, |
| 2975 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, | 2975 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, |
| 2976 base::Unretained(blink::MainThreadIsolate())), | 2976 base::Unretained(blink::MainThreadIsolate())), |
| 2977 initial_cdm, media_surface_manager_, media_observer, | 2977 initial_cdm, media_surface_manager_, |
| 2978 max_keyframe_distance_to_disable_background_video, | 2978 base::Bind(&RenderFrameImpl::RequestOverlayRoutingToken, |
| 2979 base::Unretained(this)), |
| 2980 media_observer, max_keyframe_distance_to_disable_background_video, |
| 2979 max_keyframe_distance_to_disable_background_video_mse, | 2981 max_keyframe_distance_to_disable_background_video_mse, |
| 2980 GetWebkitPreferences().enable_instant_source_buffer_gc, | 2982 GetWebkitPreferences().enable_instant_source_buffer_gc, |
| 2981 GetContentClient()->renderer()->AllowMediaSuspend(), | 2983 GetContentClient()->renderer()->AllowMediaSuspend(), |
| 2982 embedded_media_experience_enabled)); | 2984 embedded_media_experience_enabled)); |
| 2983 | 2985 |
| 2984 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( | 2986 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( |
| 2985 frame_, client, encrypted_client, GetWebMediaPlayerDelegate(), | 2987 frame_, client, encrypted_client, GetWebMediaPlayerDelegate(), |
| 2986 std::move(factory_selector), url_index_, std::move(params)); | 2988 std::move(factory_selector), url_index_, std::move(params)); |
| 2987 | 2989 |
| 2988 #if defined(OS_ANDROID) // WMPI_CAST | 2990 #if defined(OS_ANDROID) // WMPI_CAST |
| (...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5912 | 5914 |
| 5913 void RenderFrameImpl::OnSetOverlayRoutingToken( | 5915 void RenderFrameImpl::OnSetOverlayRoutingToken( |
| 5914 const base::UnguessableToken& token) { | 5916 const base::UnguessableToken& token) { |
| 5915 overlay_routing_token_ = token; | 5917 overlay_routing_token_ = token; |
| 5916 for (const auto& cb : pending_routing_token_callbacks_) | 5918 for (const auto& cb : pending_routing_token_callbacks_) |
| 5917 cb.Run(overlay_routing_token_.value()); | 5919 cb.Run(overlay_routing_token_.value()); |
| 5918 pending_routing_token_callbacks_.clear(); | 5920 pending_routing_token_callbacks_.clear(); |
| 5919 } | 5921 } |
| 5920 | 5922 |
| 5921 void RenderFrameImpl::RequestOverlayRoutingToken( | 5923 void RenderFrameImpl::RequestOverlayRoutingToken( |
| 5922 const media::RoutingTokenCallback& callback) { | 5924 media::RoutingTokenCallback callback) { |
| 5923 if (overlay_routing_token_.has_value()) { | 5925 if (overlay_routing_token_.has_value()) { |
| 5924 callback.Run(overlay_routing_token_.value()); | 5926 callback.Run(overlay_routing_token_.value()); |
| 5925 return; | 5927 return; |
| 5926 } | 5928 } |
| 5927 | 5929 |
| 5928 // Send a request to the host for the token. We'll notify |callback| when it | 5930 // Send a request to the host for the token. We'll notify |callback| when it |
| 5929 // arrives later. | 5931 // arrives later. |
| 5930 Send(new FrameHostMsg_RequestOverlayRoutingToken(routing_id_)); | 5932 Send(new FrameHostMsg_RequestOverlayRoutingToken(routing_id_)); |
| 5931 | 5933 |
| 5932 pending_routing_token_callbacks_.push_back(callback); | 5934 pending_routing_token_callbacks_.push_back(callback); |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7053 policy(info.default_policy), | 7055 policy(info.default_policy), |
| 7054 replaces_current_history_item(info.replaces_current_history_item), | 7056 replaces_current_history_item(info.replaces_current_history_item), |
| 7055 history_navigation_in_new_child_frame( | 7057 history_navigation_in_new_child_frame( |
| 7056 info.is_history_navigation_in_new_child_frame), | 7058 info.is_history_navigation_in_new_child_frame), |
| 7057 client_redirect(info.is_client_redirect), | 7059 client_redirect(info.is_client_redirect), |
| 7058 cache_disabled(info.is_cache_disabled), | 7060 cache_disabled(info.is_cache_disabled), |
| 7059 form(info.form), | 7061 form(info.form), |
| 7060 source_location(info.source_location) {} | 7062 source_location(info.source_location) {} |
| 7061 | 7063 |
| 7062 } // namespace content | 7064 } // namespace content |
| OLD | NEW |