| 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/mojo/media_router_mojo_impl.h" | 5 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 using SinkAvailability = interfaces::MediaRouter::SinkAvailability; | 39 using SinkAvailability = interfaces::MediaRouter::SinkAvailability; |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 std::unique_ptr<content::PresentationSessionMessage> | 43 std::unique_ptr<content::PresentationSessionMessage> |
| 44 ConvertToPresentationSessionMessage(interfaces::RouteMessagePtr input) { | 44 ConvertToPresentationSessionMessage(interfaces::RouteMessagePtr input) { |
| 45 DCHECK(!input.is_null()); | 45 DCHECK(!input.is_null()); |
| 46 std::unique_ptr<content::PresentationSessionMessage> output; | 46 std::unique_ptr<content::PresentationSessionMessage> output; |
| 47 switch (input->type) { | 47 switch (input->type) { |
| 48 case interfaces::RouteMessage::Type::TEXT: { | 48 case interfaces::RouteMessage::Type::TEXT: { |
| 49 DCHECK(!input->message.is_null()); | 49 DCHECK(input->message); |
| 50 DCHECK(input->data.is_null()); | 50 DCHECK(!input->data); |
| 51 output.reset(new content::PresentationSessionMessage( | 51 output.reset(new content::PresentationSessionMessage( |
| 52 content::PresentationMessageType::TEXT)); | 52 content::PresentationMessageType::TEXT)); |
| 53 input->message.Swap(&output->message); | 53 output->message = std::move(*input->message); |
| 54 return output; | 54 return output; |
| 55 } | 55 } |
| 56 case interfaces::RouteMessage::Type::BINARY: { | 56 case interfaces::RouteMessage::Type::BINARY: { |
| 57 DCHECK(!input->data.is_null()); | 57 DCHECK(input->data); |
| 58 DCHECK(input->message.is_null()); | 58 DCHECK(!input->message); |
| 59 output.reset(new content::PresentationSessionMessage( | 59 output.reset(new content::PresentationSessionMessage( |
| 60 content::PresentationMessageType::ARRAY_BUFFER)); | 60 content::PresentationMessageType::ARRAY_BUFFER)); |
| 61 output->data.reset(new std::vector<uint8_t>); | 61 output->data.reset(new std::vector<uint8_t>(std::move(*input->data))); |
| 62 input->data.Swap(output->data.get()); | |
| 63 return output; | 62 return output; |
| 64 } | 63 } |
| 65 } | 64 } |
| 66 | 65 |
| 67 NOTREACHED() << "Invalid route message type " << input->type; | 66 NOTREACHED() << "Invalid route message type " << input->type; |
| 68 return output; | 67 return output; |
| 69 } | 68 } |
| 70 | 69 |
| 71 void ForwardSinkSearchCallback(const MediaSinkSearchResponseCallback& callback, | |
| 72 mojo::String sink_id) { | |
| 73 callback.Run(sink_id); | |
| 74 } | |
| 75 | |
| 76 } // namespace | 70 } // namespace |
| 77 | 71 |
| 78 MediaRouterMojoImpl::MediaRoutesQuery::MediaRoutesQuery() = default; | 72 MediaRouterMojoImpl::MediaRoutesQuery::MediaRoutesQuery() = default; |
| 79 | 73 |
| 80 MediaRouterMojoImpl::MediaRoutesQuery::~MediaRoutesQuery() = default; | 74 MediaRouterMojoImpl::MediaRoutesQuery::~MediaRoutesQuery() = default; |
| 81 | 75 |
| 82 MediaRouterMojoImpl::MediaSinksQuery::MediaSinksQuery() = default; | 76 MediaRouterMojoImpl::MediaSinksQuery::MediaSinksQuery() = default; |
| 83 | 77 |
| 84 MediaRouterMojoImpl::MediaSinksQuery::~MediaSinksQuery() = default; | 78 MediaRouterMojoImpl::MediaSinksQuery::~MediaSinksQuery() = default; |
| 85 | 79 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 } | 187 } |
| 194 | 188 |
| 195 void MediaRouterMojoImpl::OnIssue(const interfaces::IssuePtr issue) { | 189 void MediaRouterMojoImpl::OnIssue(const interfaces::IssuePtr issue) { |
| 196 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 190 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 197 DVLOG_WITH_INSTANCE(1) << "OnIssue " << issue->title; | 191 DVLOG_WITH_INSTANCE(1) << "OnIssue " << issue->title; |
| 198 const Issue& issue_converted = issue.To<Issue>(); | 192 const Issue& issue_converted = issue.To<Issue>(); |
| 199 issue_manager_.AddIssue(issue_converted); | 193 issue_manager_.AddIssue(issue_converted); |
| 200 } | 194 } |
| 201 | 195 |
| 202 void MediaRouterMojoImpl::OnSinksReceived( | 196 void MediaRouterMojoImpl::OnSinksReceived( |
| 203 const mojo::String& media_source, | 197 const std::string& media_source, |
| 204 mojo::Array<interfaces::MediaSinkPtr> sinks, | 198 std::vector<interfaces::MediaSinkPtr> sinks, |
| 205 mojo::Array<mojo::String> origins) { | 199 const std::vector<std::string>& origins) { |
| 206 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 200 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 207 DVLOG_WITH_INSTANCE(1) << "OnSinksReceived"; | 201 DVLOG_WITH_INSTANCE(1) << "OnSinksReceived"; |
| 208 auto it = sinks_queries_.find(media_source); | 202 auto it = sinks_queries_.find(media_source); |
| 209 if (it == sinks_queries_.end()) { | 203 if (it == sinks_queries_.end()) { |
| 210 DVLOG_WITH_INSTANCE(1) << "Received sink list without MediaSinksQuery."; | 204 DVLOG_WITH_INSTANCE(1) << "Received sink list without MediaSinksQuery."; |
| 211 return; | 205 return; |
| 212 } | 206 } |
| 213 | 207 |
| 214 std::vector<GURL> origin_list; | 208 std::vector<GURL> origin_list; |
| 215 origin_list.reserve(origins.size()); | 209 origin_list.reserve(origins.size()); |
| 216 for (size_t i = 0; i < origins.size(); ++i) { | 210 for (size_t i = 0; i < origins.size(); ++i) { |
| 217 GURL origin(origins[i].get()); | 211 GURL origin(origins[i]); |
| 218 if (!origin.is_valid()) { | 212 if (!origin.is_valid()) { |
| 219 LOG(WARNING) << "Received invalid origin: " << origin | 213 LOG(WARNING) << "Received invalid origin: " << origin |
| 220 << ". Dropping result."; | 214 << ". Dropping result."; |
| 221 return; | 215 return; |
| 222 } | 216 } |
| 223 origin_list.push_back(origin); | 217 origin_list.push_back(origin); |
| 224 } | 218 } |
| 225 | 219 |
| 226 std::vector<MediaSink> sink_list; | 220 std::vector<MediaSink> sink_list; |
| 227 sink_list.reserve(sinks.size()); | 221 sink_list.reserve(sinks.size()); |
| 228 for (size_t i = 0; i < sinks.size(); ++i) | 222 for (size_t i = 0; i < sinks.size(); ++i) |
| 229 sink_list.push_back(sinks[i].To<MediaSink>()); | 223 sink_list.push_back(sinks[i].To<MediaSink>()); |
| 230 | 224 |
| 231 auto* sinks_query = it->second; | 225 auto* sinks_query = it->second; |
| 232 sinks_query->has_cached_result = true; | 226 sinks_query->has_cached_result = true; |
| 233 sinks_query->origins.swap(origin_list); | 227 sinks_query->origins.swap(origin_list); |
| 234 sinks_query->cached_sink_list.swap(sink_list); | 228 sinks_query->cached_sink_list.swap(sink_list); |
| 235 | 229 |
| 236 if (!sinks_query->observers.might_have_observers()) { | 230 if (!sinks_query->observers.might_have_observers()) { |
| 237 DVLOG_WITH_INSTANCE(1) | 231 DVLOG_WITH_INSTANCE(1) |
| 238 << "Received sink list without any active observers: " << media_source; | 232 << "Received sink list without any active observers: " << media_source; |
| 239 } else { | 233 } else { |
| 240 FOR_EACH_OBSERVER( | 234 FOR_EACH_OBSERVER( |
| 241 MediaSinksObserver, sinks_query->observers, | 235 MediaSinksObserver, sinks_query->observers, |
| 242 OnSinksUpdated(sinks_query->cached_sink_list, sinks_query->origins)); | 236 OnSinksUpdated(sinks_query->cached_sink_list, sinks_query->origins)); |
| 243 } | 237 } |
| 244 } | 238 } |
| 245 | 239 |
| 246 void MediaRouterMojoImpl::OnRoutesUpdated( | 240 void MediaRouterMojoImpl::OnRoutesUpdated( |
| 247 mojo::Array<interfaces::MediaRoutePtr> routes, | 241 std::vector<interfaces::MediaRoutePtr> routes, |
| 248 const mojo::String& media_source, | 242 const std::string& media_source, |
| 249 mojo::Array<mojo::String> joinable_route_ids) { | 243 const std::vector<std::string>& joinable_route_ids) { |
| 250 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 244 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 251 | 245 |
| 252 DVLOG_WITH_INSTANCE(1) << "OnRoutesUpdated"; | 246 DVLOG_WITH_INSTANCE(1) << "OnRoutesUpdated"; |
| 253 auto it = routes_queries_.find(media_source); | 247 auto it = routes_queries_.find(media_source); |
| 254 if (it == routes_queries_.end() || | 248 if (it == routes_queries_.end() || |
| 255 !(it->second->observers.might_have_observers())) { | 249 !(it->second->observers.might_have_observers())) { |
| 256 DVLOG_WITH_INSTANCE(1) | 250 DVLOG_WITH_INSTANCE(1) |
| 257 << "Received route list without any active observers: " << media_source; | 251 << "Received route list without any active observers: " << media_source; |
| 258 return; | 252 return; |
| 259 } | 253 } |
| 260 | 254 |
| 261 std::vector<MediaRoute> routes_converted; | 255 std::vector<MediaRoute> routes_converted; |
| 262 routes_converted.reserve(routes.size()); | 256 routes_converted.reserve(routes.size()); |
| 263 | |
| 264 for (size_t i = 0; i < routes.size(); ++i) | 257 for (size_t i = 0; i < routes.size(); ++i) |
| 265 routes_converted.push_back(routes[i].To<MediaRoute>()); | 258 routes_converted.push_back(routes[i].To<MediaRoute>()); |
| 266 | 259 |
| 267 std::vector<MediaRoute::Id> joinable_routes_converted = | |
| 268 joinable_route_ids.To<std::vector<std::string>>(); | |
| 269 | |
| 270 FOR_EACH_OBSERVER( | 260 FOR_EACH_OBSERVER( |
| 271 MediaRoutesObserver, it->second->observers, | 261 MediaRoutesObserver, it->second->observers, |
| 272 OnRoutesUpdated(routes_converted, joinable_routes_converted)); | 262 OnRoutesUpdated(routes_converted, joinable_route_ids)); |
| 273 } | 263 } |
| 274 | 264 |
| 275 void MediaRouterMojoImpl::RouteResponseReceived( | 265 void MediaRouterMojoImpl::RouteResponseReceived( |
| 276 const std::string& presentation_id, | 266 const std::string& presentation_id, |
| 277 bool incognito, | 267 bool incognito, |
| 278 const std::vector<MediaRouteResponseCallback>& callbacks, | 268 const std::vector<MediaRouteResponseCallback>& callbacks, |
| 279 interfaces::MediaRoutePtr media_route, | 269 interfaces::MediaRoutePtr media_route, |
| 280 mojo::String error_text, | 270 const base::Optional<std::string>& error_text, |
| 281 interfaces::RouteRequestResultCode result_code) { | 271 interfaces::RouteRequestResultCode result_code) { |
| 282 std::unique_ptr<RouteRequestResult> result; | 272 std::unique_ptr<RouteRequestResult> result; |
| 283 if (media_route.is_null()) { | 273 if (media_route.is_null()) { |
| 284 // An error occurred. | 274 // An error occurred. |
| 285 DCHECK(!error_text.is_null()); | 275 const std::string& error = (error_text && !error_text->empty()) |
| 286 std::string error = | 276 ? *error_text : std::string("Unknown error."); |
| 287 !error_text.get().empty() ? error_text.get() : "Unknown error."; | |
| 288 result = RouteRequestResult::FromError( | 277 result = RouteRequestResult::FromError( |
| 289 error, mojo::RouteRequestResultCodeFromMojo(result_code)); | 278 error, mojo::RouteRequestResultCodeFromMojo(result_code)); |
| 290 } else if (media_route->incognito != incognito) { | 279 } else if (media_route->incognito != incognito) { |
| 291 std::string error = base::StringPrintf( | 280 std::string error = base::StringPrintf( |
| 292 "Mismatch in incognito status: request = %d, response = %d", incognito, | 281 "Mismatch in incognito status: request = %d, response = %d", incognito, |
| 293 media_route->incognito); | 282 media_route->incognito); |
| 294 result = RouteRequestResult::FromError( | 283 result = RouteRequestResult::FromError( |
| 295 error, RouteRequestResult::INCOGNITO_MISMATCH); | 284 error, RouteRequestResult::INCOGNITO_MISMATCH); |
| 296 } else { | 285 } else { |
| 297 result = RouteRequestResult::FromSuccess( | 286 result = RouteRequestResult::FromSuccess( |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 const SendRouteMessageCallback& callback) { | 694 const SendRouteMessageCallback& callback) { |
| 706 DVLOG_WITH_INSTANCE(1) << "SendRouteMessage " << route_id; | 695 DVLOG_WITH_INSTANCE(1) << "SendRouteMessage " << route_id; |
| 707 media_route_provider_->SendRouteMessage(route_id, message, callback); | 696 media_route_provider_->SendRouteMessage(route_id, message, callback); |
| 708 } | 697 } |
| 709 | 698 |
| 710 void MediaRouterMojoImpl::DoSendSessionBinaryMessage( | 699 void MediaRouterMojoImpl::DoSendSessionBinaryMessage( |
| 711 const MediaRoute::Id& route_id, | 700 const MediaRoute::Id& route_id, |
| 712 std::unique_ptr<std::vector<uint8_t>> data, | 701 std::unique_ptr<std::vector<uint8_t>> data, |
| 713 const SendRouteMessageCallback& callback) { | 702 const SendRouteMessageCallback& callback) { |
| 714 DVLOG_WITH_INSTANCE(1) << "SendRouteBinaryMessage " << route_id; | 703 DVLOG_WITH_INSTANCE(1) << "SendRouteBinaryMessage " << route_id; |
| 715 mojo::Array<uint8_t> mojo_array; | 704 media_route_provider_->SendRouteBinaryMessage(route_id, *data, callback); |
| 716 mojo_array.Swap(data.get()); | |
| 717 media_route_provider_->SendRouteBinaryMessage(route_id, std::move(mojo_array), | |
| 718 callback); | |
| 719 } | 705 } |
| 720 | 706 |
| 721 void MediaRouterMojoImpl::DoStartListeningForRouteMessages( | 707 void MediaRouterMojoImpl::DoStartListeningForRouteMessages( |
| 722 const MediaRoute::Id& route_id) { | 708 const MediaRoute::Id& route_id) { |
| 723 DVLOG_WITH_INSTANCE(1) << "DoStartListeningForRouteMessages"; | 709 DVLOG_WITH_INSTANCE(1) << "DoStartListeningForRouteMessages"; |
| 724 media_route_provider_->StartListeningForRouteMessages(route_id); | 710 media_route_provider_->StartListeningForRouteMessages(route_id); |
| 725 } | 711 } |
| 726 | 712 |
| 727 void MediaRouterMojoImpl::DoStopListeningForRouteMessages( | 713 void MediaRouterMojoImpl::DoStopListeningForRouteMessages( |
| 728 const MediaRoute::Id& route_id) { | 714 const MediaRoute::Id& route_id) { |
| 729 DVLOG_WITH_INSTANCE(1) << "StopListeningForRouteMessages"; | 715 DVLOG_WITH_INSTANCE(1) << "StopListeningForRouteMessages"; |
| 730 media_route_provider_->StopListeningForRouteMessages(route_id); | 716 media_route_provider_->StopListeningForRouteMessages(route_id); |
| 731 } | 717 } |
| 732 | 718 |
| 733 void MediaRouterMojoImpl::DoSearchSinks( | 719 void MediaRouterMojoImpl::DoSearchSinks( |
| 734 const MediaSink::Id& sink_id, | 720 const MediaSink::Id& sink_id, |
| 735 const MediaSource::Id& source_id, | 721 const MediaSource::Id& source_id, |
| 736 const std::string& search_input, | 722 const std::string& search_input, |
| 737 const std::string& domain, | 723 const std::string& domain, |
| 738 const MediaSinkSearchResponseCallback& sink_callback) { | 724 const MediaSinkSearchResponseCallback& sink_callback) { |
| 739 DVLOG_WITH_INSTANCE(1) << "SearchSinks"; | 725 DVLOG_WITH_INSTANCE(1) << "SearchSinks"; |
| 740 auto sink_search_criteria = interfaces::SinkSearchCriteria::New(); | 726 auto sink_search_criteria = interfaces::SinkSearchCriteria::New(); |
| 741 sink_search_criteria->input = search_input; | 727 sink_search_criteria->input = search_input; |
| 742 sink_search_criteria->domain = domain; | 728 sink_search_criteria->domain = domain; |
| 743 media_route_provider_->SearchSinks( | 729 media_route_provider_->SearchSinks( |
| 744 sink_id, source_id, std::move(sink_search_criteria), | 730 sink_id, source_id, std::move(sink_search_criteria), sink_callback); |
| 745 base::Bind(&ForwardSinkSearchCallback, sink_callback)); | |
| 746 } | 731 } |
| 747 | 732 |
| 748 void MediaRouterMojoImpl::OnRouteMessagesReceived( | 733 void MediaRouterMojoImpl::OnRouteMessagesReceived( |
| 749 const mojo::String& route_id, | 734 const std::string& route_id, |
| 750 mojo::Array<interfaces::RouteMessagePtr> messages) { | 735 std::vector<interfaces::RouteMessagePtr> messages) { |
| 751 DVLOG_WITH_INSTANCE(1) << "OnRouteMessagesReceived"; | 736 DVLOG_WITH_INSTANCE(1) << "OnRouteMessagesReceived"; |
| 752 | 737 |
| 753 DCHECK(!messages.storage().empty()); | 738 DCHECK(!messages.empty()); |
| 754 | 739 |
| 755 auto* observer_list = messages_observers_.get(route_id); | 740 auto* observer_list = messages_observers_.get(route_id); |
| 756 if (!observer_list) { | 741 if (!observer_list) { |
| 757 return; | 742 return; |
| 758 } | 743 } |
| 759 | 744 |
| 760 ScopedVector<content::PresentationSessionMessage> session_messages; | 745 ScopedVector<content::PresentationSessionMessage> session_messages; |
| 761 session_messages.reserve(messages.size()); | 746 session_messages.reserve(messages.size()); |
| 762 for (size_t i = 0; i < messages.size(); ++i) { | 747 for (size_t i = 0; i < messages.size(); ++i) { |
| 763 session_messages.push_back( | 748 session_messages.push_back( |
| (...skipping 25 matching lines...) Expand all Loading... |
| 789 } else { | 774 } else { |
| 790 // Sinks are now available. Tell MRPM to start all sink queries again. | 775 // Sinks are now available. Tell MRPM to start all sink queries again. |
| 791 for (const auto& source_and_query : sinks_queries_) { | 776 for (const auto& source_and_query : sinks_queries_) { |
| 792 RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoStartObservingMediaSinks, | 777 RunOrDefer(base::Bind(&MediaRouterMojoImpl::DoStartObservingMediaSinks, |
| 793 base::Unretained(this), source_and_query.first)); | 778 base::Unretained(this), source_and_query.first)); |
| 794 } | 779 } |
| 795 } | 780 } |
| 796 } | 781 } |
| 797 | 782 |
| 798 void MediaRouterMojoImpl::OnPresentationConnectionStateChanged( | 783 void MediaRouterMojoImpl::OnPresentationConnectionStateChanged( |
| 799 const mojo::String& route_id, | 784 const std::string& route_id, |
| 800 interfaces::MediaRouter::PresentationConnectionState state) { | 785 interfaces::MediaRouter::PresentationConnectionState state) { |
| 801 NotifyPresentationConnectionStateChange( | 786 NotifyPresentationConnectionStateChange( |
| 802 route_id, mojo::PresentationConnectionStateFromMojo(state)); | 787 route_id, mojo::PresentationConnectionStateFromMojo(state)); |
| 803 } | 788 } |
| 804 | 789 |
| 805 void MediaRouterMojoImpl::OnPresentationConnectionClosed( | 790 void MediaRouterMojoImpl::OnPresentationConnectionClosed( |
| 806 const mojo::String& route_id, | 791 const std::string& route_id, |
| 807 interfaces::MediaRouter::PresentationConnectionCloseReason reason, | 792 interfaces::MediaRouter::PresentationConnectionCloseReason reason, |
| 808 const mojo::String& message) { | 793 const std::string& message) { |
| 809 NotifyPresentationConnectionClose( | 794 NotifyPresentationConnectionClose( |
| 810 route_id, mojo::PresentationConnectionCloseReasonFromMojo(reason), | 795 route_id, mojo::PresentationConnectionCloseReasonFromMojo(reason), |
| 811 message); | 796 message); |
| 812 } | 797 } |
| 813 | 798 |
| 814 void MediaRouterMojoImpl::OnTerminateRouteResult( | 799 void MediaRouterMojoImpl::OnTerminateRouteResult( |
| 815 const MediaRoute::Id& route_id, | 800 const MediaRoute::Id& route_id, |
| 816 mojo::String error_text, | 801 const base::Optional<std::string>& error_text, |
| 817 interfaces::RouteRequestResultCode result_code) { | 802 interfaces::RouteRequestResultCode result_code) { |
| 818 if (result_code != interfaces::RouteRequestResultCode::OK) { | 803 if (result_code != interfaces::RouteRequestResultCode::OK) { |
| 819 LOG(WARNING) << "Failed to terminate route " << route_id << | 804 LOG(WARNING) << "Failed to terminate route " << route_id |
| 820 ": result_code = " << result_code << ", " << error_text; | 805 << ": result_code = " << result_code << ", " |
| 806 << error_text.value_or(std::string()); |
| 821 } | 807 } |
| 822 MediaRouterMojoMetrics::RecordMediaRouteProviderTerminateRoute( | 808 MediaRouterMojoMetrics::RecordMediaRouteProviderTerminateRoute( |
| 823 mojo::RouteRequestResultCodeFromMojo(result_code)); | 809 mojo::RouteRequestResultCodeFromMojo(result_code)); |
| 824 } | 810 } |
| 825 | 811 |
| 826 void MediaRouterMojoImpl::DoStartObservingMediaSinks( | 812 void MediaRouterMojoImpl::DoStartObservingMediaSinks( |
| 827 const MediaSource::Id& source_id) { | 813 const MediaSource::Id& source_id) { |
| 828 DVLOG_WITH_INSTANCE(1) << "DoStartObservingMediaSinks: " << source_id; | 814 DVLOG_WITH_INSTANCE(1) << "DoStartObservingMediaSinks: " << source_id; |
| 829 // No need to call MRPM if there are no sinks available. | 815 // No need to call MRPM if there are no sinks available. |
| 830 if (availability_ == interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) | 816 if (availability_ == interfaces::MediaRouter::SinkAvailability::UNAVAILABLE) |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 base::Unretained(this), source_id)); | 1014 base::Unretained(this), source_id)); |
| 1029 } | 1015 } |
| 1030 | 1016 |
| 1031 void MediaRouterMojoImpl::DoUpdateMediaSinks( | 1017 void MediaRouterMojoImpl::DoUpdateMediaSinks( |
| 1032 const MediaSource::Id& source_id) { | 1018 const MediaSource::Id& source_id) { |
| 1033 DVLOG_WITH_INSTANCE(1) << "DoUpdateMediaSinks" << source_id; | 1019 DVLOG_WITH_INSTANCE(1) << "DoUpdateMediaSinks" << source_id; |
| 1034 media_route_provider_->UpdateMediaSinks(source_id); | 1020 media_route_provider_->UpdateMediaSinks(source_id); |
| 1035 } | 1021 } |
| 1036 | 1022 |
| 1037 } // namespace media_router | 1023 } // namespace media_router |
| OLD | NEW |