| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 for (auto& observer : routes_query->observers) | 214 for (auto& observer : routes_query->observers) |
| 215 observer.OnRoutesUpdated(routes, joinable_route_ids); | 215 observer.OnRoutesUpdated(routes, joinable_route_ids); |
| 216 } else { | 216 } else { |
| 217 DVLOG_WITH_INSTANCE(1) | 217 DVLOG_WITH_INSTANCE(1) |
| 218 << "Received routes update without any active observers: " | 218 << "Received routes update without any active observers: " |
| 219 << media_source; | 219 << media_source; |
| 220 } | 220 } |
| 221 RemoveInvalidRouteControllers(routes); | 221 RemoveInvalidRouteControllers(routes); |
| 222 } | 222 } |
| 223 | 223 |
| 224 const std::string& MediaRouterMojoImpl::media_route_provider_extension_id() | |
| 225 const { | |
| 226 return event_page_request_manager_->media_route_provider_extension_id(); | |
| 227 } | |
| 228 | |
| 229 void MediaRouterMojoImpl::RouteResponseReceived( | 224 void MediaRouterMojoImpl::RouteResponseReceived( |
| 230 const std::string& presentation_id, | 225 const std::string& presentation_id, |
| 231 bool is_incognito, | 226 bool is_incognito, |
| 232 std::vector<MediaRouteResponseCallback> callbacks, | 227 std::vector<MediaRouteResponseCallback> callbacks, |
| 233 bool is_join, | 228 bool is_join, |
| 234 const base::Optional<MediaRoute>& media_route, | 229 const base::Optional<MediaRoute>& media_route, |
| 235 const base::Optional<std::string>& error_text, | 230 const base::Optional<std::string>& error_text, |
| 236 RouteRequestResult::ResultCode result_code) { | 231 RouteRequestResult::ResultCode result_code) { |
| 237 std::unique_ptr<RouteRequestResult> result; | 232 std::unique_ptr<RouteRequestResult> result; |
| 238 if (!media_route) { | 233 if (!media_route) { |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 | 1010 |
| 1016 void MediaRouterMojoImpl::OnMediaControllerCreated( | 1011 void MediaRouterMojoImpl::OnMediaControllerCreated( |
| 1017 const MediaRoute::Id& route_id, | 1012 const MediaRoute::Id& route_id, |
| 1018 bool success) { | 1013 bool success) { |
| 1019 DVLOG_WITH_INSTANCE(1) << "OnMediaControllerCreated: " << route_id | 1014 DVLOG_WITH_INSTANCE(1) << "OnMediaControllerCreated: " << route_id |
| 1020 << (success ? " was successful." : " failed."); | 1015 << (success ? " was successful." : " failed."); |
| 1021 MediaRouterMojoMetrics::RecordMediaRouteControllerCreationResult(success); | 1016 MediaRouterMojoMetrics::RecordMediaRouteControllerCreationResult(success); |
| 1022 } | 1017 } |
| 1023 | 1018 |
| 1024 } // namespace media_router | 1019 } // namespace media_router |
| OLD | NEW |