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

Side by Side Diff: chrome/browser/media/router/presentation_service_delegate_impl.cc

Issue 2355723004: [Presentation API] 1-UA: send message between controller and receiver page (Closed)
Patch Set: Merge with changes in Issue 2343013002 Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/media/router/presentation_service_delegate_impl.h" 5 #include "chrome/browser/media/router/presentation_service_delegate_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <unordered_map> 8 #include <unordered_map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 void PresentationFrame::OnPresentationServiceDelegateDestroyed() const { 205 void PresentationFrame::OnPresentationServiceDelegateDestroyed() const {
206 if (delegate_observer_) 206 if (delegate_observer_)
207 delegate_observer_->OnDelegateDestroyed(); 207 delegate_observer_->OnDelegateDestroyed();
208 } 208 }
209 209
210 void PresentationFrame::OnPresentationSessionStarted( 210 void PresentationFrame::OnPresentationSessionStarted(
211 const content::PresentationSessionInfo& session, 211 const content::PresentationSessionInfo& session,
212 const MediaRoute::Id& route_id) { 212 const MediaRoute::Id& route_id) {
213 presentation_id_to_route_id_[session.presentation_id] = route_id; 213 presentation_id_to_route_id_[session.presentation_id] = route_id;
214 offscreen_presentation_manager_->RegisterOffscreenPresentationController( 214 offscreen_presentation_manager_->RegisterOffscreenPresentationController(
215 session.presentation_id, render_frame_host_id_.second, 215 session.presentation_id, session.presentation_url,
216 offscreen_presentation_client_); 216 render_frame_host_id_.second, offscreen_presentation_client_);
217 } 217 }
218 218
219 const MediaRoute::Id PresentationFrame::GetRouteId( 219 const MediaRoute::Id PresentationFrame::GetRouteId(
220 const std::string& presentation_id) const { 220 const std::string& presentation_id) const {
221 auto it = presentation_id_to_route_id_.find(presentation_id); 221 auto it = presentation_id_to_route_id_.find(presentation_id);
222 return it != presentation_id_to_route_id_.end() ? it->second : ""; 222 return it != presentation_id_to_route_id_.end() ? it->second : "";
223 } 223 }
224 224
225 const std::vector<MediaRoute::Id> PresentationFrame::GetRouteIds() const { 225 const std::vector<MediaRoute::Id> PresentationFrame::GetRouteIds() const {
226 std::vector<MediaRoute::Id> route_ids; 226 std::vector<MediaRoute::Id> route_ids;
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 void PresentationServiceDelegateImpl::RegisterOffscreenPresentationClient( 1001 void PresentationServiceDelegateImpl::RegisterOffscreenPresentationClient(
1002 int render_process_id, 1002 int render_process_id,
1003 int render_frame_id, 1003 int render_frame_id,
1004 content::OffscreenPresentationClient* client) { 1004 content::OffscreenPresentationClient* client) {
1005 RenderFrameHostId render_frame_host_id(render_process_id, render_frame_id); 1005 RenderFrameHostId render_frame_host_id(render_process_id, render_frame_id);
1006 frame_manager_->RegisterOffscreenPresentationClient(render_frame_host_id, 1006 frame_manager_->RegisterOffscreenPresentationClient(render_frame_host_id,
1007 client); 1007 client);
1008 } 1008 }
1009 1009
1010 } // namespace media_router 1010 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698