Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 749 result.route()->media_route_id()); | 749 result.route()->media_route_id()); |
| 750 success_cb.Run(session); | 750 success_cb.Run(session); |
| 751 } | 751 } |
| 752 } | 752 } |
| 753 | 753 |
| 754 void PresentationServiceDelegateImpl::OnStartSessionSucceeded( | 754 void PresentationServiceDelegateImpl::OnStartSessionSucceeded( |
| 755 int render_process_id, | 755 int render_process_id, |
| 756 int render_frame_id, | 756 int render_frame_id, |
| 757 const content::PresentationSessionStartedCallback& success_cb, | 757 const content::PresentationSessionStartedCallback& success_cb, |
| 758 const content::PresentationSessionInfo& new_session, | 758 const content::PresentationSessionInfo& new_session, |
| 759 const MediaRoute::Id& route_id) { | 759 const MediaRoute& route) { |
| 760 const MediaRoute::Id& route_id = route.media_route_id(); | |
| 760 DVLOG(1) << "OnStartSessionSucceeded: " | 761 DVLOG(1) << "OnStartSessionSucceeded: " |
| 761 << "route_id: " << route_id | 762 << "route_id: " << route_id |
| 762 << ", presentation URL: " << new_session.presentation_url | 763 << ", presentation URL: " << new_session.presentation_url |
| 763 << ", presentation ID: " << new_session.presentation_id; | 764 << ", presentation ID: " << new_session.presentation_id |
| 765 << ", is_offscreen_presentation: " << new_session.is_offscreen; | |
| 764 frame_manager_->OnPresentationSessionStarted( | 766 frame_manager_->OnPresentationSessionStarted( |
| 765 RenderFrameHostId(render_process_id, render_frame_id), new_session, | 767 RenderFrameHostId(render_process_id, render_frame_id), new_session, |
| 766 route_id); | 768 route_id); |
|
mark a. foltz
2016/11/03 18:32:05
Would be nice to pass |route| here instead of |rou
zhaobin
2016/11/03 23:00:46
Will do it in a seperate CL. |route_id| used in lo
| |
| 767 success_cb.Run(new_session); | 769 success_cb.Run(new_session); |
| 768 } | 770 } |
| 769 | 771 |
| 770 void PresentationServiceDelegateImpl::StartSession( | 772 void PresentationServiceDelegateImpl::StartSession( |
| 771 int render_process_id, | 773 int render_process_id, |
| 772 int render_frame_id, | 774 int render_frame_id, |
| 773 const std::vector<GURL>& presentation_urls, | 775 const std::vector<GURL>& presentation_urls, |
| 774 const content::PresentationSessionStartedCallback& success_cb, | 776 const content::PresentationSessionStartedCallback& success_cb, |
| 775 const content::PresentationSessionErrorCallback& error_cb) { | 777 const content::PresentationSessionErrorCallback& error_cb) { |
| 776 if (presentation_urls.empty()) { | 778 if (presentation_urls.empty()) { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 961 bool PresentationServiceDelegateImpl::HasScreenAvailabilityListenerForTest( | 963 bool PresentationServiceDelegateImpl::HasScreenAvailabilityListenerForTest( |
| 962 int render_process_id, | 964 int render_process_id, |
| 963 int render_frame_id, | 965 int render_frame_id, |
| 964 const MediaSource::Id& source_id) const { | 966 const MediaSource::Id& source_id) const { |
| 965 RenderFrameHostId render_frame_host_id(render_process_id, render_frame_id); | 967 RenderFrameHostId render_frame_host_id(render_process_id, render_frame_id); |
| 966 return frame_manager_->HasScreenAvailabilityListenerForTest( | 968 return frame_manager_->HasScreenAvailabilityListenerForTest( |
| 967 render_frame_host_id, source_id); | 969 render_frame_host_id, source_id); |
| 968 } | 970 } |
| 969 | 971 |
| 970 } // namespace media_router | 972 } // namespace media_router |
| OLD | NEW |