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

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

Issue 2849043002: Send AndroidOverlay routing token from WMPI to AVDA. (Closed)
Patch Set: merged HaveOverlayInfo and SendOverlayInfo Created 3 years, 7 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
OLDNEW
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 2955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 std::move(media_log), 2966 std::move(media_log),
2967 base::Bind(&ContentRendererClient::DeferMediaLoad, 2967 base::Bind(&ContentRendererClient::DeferMediaLoad,
2968 base::Unretained(GetContentClient()->renderer()), 2968 base::Unretained(GetContentClient()->renderer()),
2969 static_cast<RenderFrame*>(this), 2969 static_cast<RenderFrame*>(this),
2970 GetWebMediaPlayerDelegate()->has_played_media()), 2970 GetWebMediaPlayerDelegate()->has_played_media()),
2971 audio_renderer_sink, render_thread->GetMediaThreadTaskRunner(), 2971 audio_renderer_sink, render_thread->GetMediaThreadTaskRunner(),
2972 render_thread->GetWorkerTaskRunner(), 2972 render_thread->GetWorkerTaskRunner(),
2973 render_thread->compositor_task_runner(), context_3d_cb, 2973 render_thread->compositor_task_runner(), context_3d_cb,
2974 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, 2974 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory,
2975 base::Unretained(blink::MainThreadIsolate())), 2975 base::Unretained(blink::MainThreadIsolate())),
2976 initial_cdm, media_surface_manager_, media_observer, 2976 initial_cdm, media_surface_manager_,
2977 max_keyframe_distance_to_disable_background_video, 2977 base::Bind(&RenderFrameImpl::RequestOverlayRoutingToken,
2978 base::Unretained(this)),
2979 media_observer, max_keyframe_distance_to_disable_background_video,
2978 max_keyframe_distance_to_disable_background_video_mse, 2980 max_keyframe_distance_to_disable_background_video_mse,
2979 GetWebkitPreferences().enable_instant_source_buffer_gc, 2981 GetWebkitPreferences().enable_instant_source_buffer_gc,
2980 GetContentClient()->renderer()->AllowMediaSuspend(), 2982 GetContentClient()->renderer()->AllowMediaSuspend(),
2981 embedded_media_experience_enabled)); 2983 embedded_media_experience_enabled));
2982 2984
2983 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl( 2985 media::WebMediaPlayerImpl* media_player = new media::WebMediaPlayerImpl(
2984 frame_, client, encrypted_client, GetWebMediaPlayerDelegate(), 2986 frame_, client, encrypted_client, GetWebMediaPlayerDelegate(),
2985 std::move(factory_selector), url_index_, std::move(params)); 2987 std::move(factory_selector), url_index_, std::move(params));
2986 2988
2987 #if defined(OS_ANDROID) // WMPI_CAST 2989 #if defined(OS_ANDROID) // WMPI_CAST
(...skipping 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after
5934 5936
5935 void RenderFrameImpl::OnSetOverlayRoutingToken( 5937 void RenderFrameImpl::OnSetOverlayRoutingToken(
5936 const base::UnguessableToken& token) { 5938 const base::UnguessableToken& token) {
5937 overlay_routing_token_ = token; 5939 overlay_routing_token_ = token;
5938 for (const auto& cb : pending_routing_token_callbacks_) 5940 for (const auto& cb : pending_routing_token_callbacks_)
5939 cb.Run(overlay_routing_token_.value()); 5941 cb.Run(overlay_routing_token_.value());
5940 pending_routing_token_callbacks_.clear(); 5942 pending_routing_token_callbacks_.clear();
5941 } 5943 }
5942 5944
5943 void RenderFrameImpl::RequestOverlayRoutingToken( 5945 void RenderFrameImpl::RequestOverlayRoutingToken(
5944 const media::RoutingTokenCallback& callback) { 5946 media::RoutingTokenCallback callback) {
5945 if (overlay_routing_token_.has_value()) { 5947 if (overlay_routing_token_.has_value()) {
5946 callback.Run(overlay_routing_token_.value()); 5948 callback.Run(overlay_routing_token_.value());
5947 return; 5949 return;
5948 } 5950 }
5949 5951
5950 // Send a request to the host for the token. We'll notify |callback| when it 5952 // Send a request to the host for the token. We'll notify |callback| when it
5951 // arrives later. 5953 // arrives later.
5952 Send(new FrameHostMsg_RequestOverlayRoutingToken(routing_id_)); 5954 Send(new FrameHostMsg_RequestOverlayRoutingToken(routing_id_));
5953 5955
5954 pending_routing_token_callbacks_.push_back(callback); 5956 pending_routing_token_callbacks_.push_back(callback);
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
7075 policy(info.default_policy), 7077 policy(info.default_policy),
7076 replaces_current_history_item(info.replaces_current_history_item), 7078 replaces_current_history_item(info.replaces_current_history_item),
7077 history_navigation_in_new_child_frame( 7079 history_navigation_in_new_child_frame(
7078 info.is_history_navigation_in_new_child_frame), 7080 info.is_history_navigation_in_new_child_frame),
7079 client_redirect(info.is_client_redirect), 7081 client_redirect(info.is_client_redirect),
7080 cache_disabled(info.is_cache_disabled), 7082 cache_disabled(info.is_cache_disabled),
7081 form(info.form), 7083 form(info.form),
7082 source_location(info.source_location) {} 7084 source_location(info.source_location) {}
7083 7085
7084 } // namespace content 7086 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698