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/ui/webui/media_router/media_router_ui.h" | 5 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "chrome/browser/media/router/create_presentation_session_request.h" | 10 #include "chrome/browser/media/router/create_presentation_session_request.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 void MediaRouterUI::OnRoutesUpdated(const std::vector<MediaRoute>& routes) { | 271 void MediaRouterUI::OnRoutesUpdated(const std::vector<MediaRoute>& routes) { |
272 routes_ = routes; | 272 routes_ = routes; |
273 if (ui_initialized_) | 273 if (ui_initialized_) |
274 handler_->UpdateRoutes(routes_); | 274 handler_->UpdateRoutes(routes_); |
275 } | 275 } |
276 | 276 |
277 void MediaRouterUI::OnRouteResponseReceived(const MediaSink::Id& sink_id, | 277 void MediaRouterUI::OnRouteResponseReceived(const MediaSink::Id& sink_id, |
278 const MediaRoute* route, | 278 const MediaRoute* route, |
279 const std::string& presentation_id, | 279 const std::string& presentation_id, |
280 const std::string& error) { | 280 const std::string& error, |
| 281 bool is_one_ua_presentation) { |
281 DVLOG(1) << "OnRouteResponseReceived"; | 282 DVLOG(1) << "OnRouteResponseReceived"; |
282 // TODO(imcheng): Display error in UI. (crbug.com/490372) | 283 // TODO(imcheng): Display error in UI. (crbug.com/490372) |
283 if (!route) | 284 if (!route) |
284 DVLOG(0) << "MediaRouteResponse returned error: " << error; | 285 DVLOG(0) << "MediaRouteResponse returned error: " << error; |
285 | 286 |
286 handler_->OnCreateRouteResponseReceived(sink_id, route); | 287 handler_->OnCreateRouteResponseReceived(sink_id, route); |
287 has_pending_route_request_ = false; | 288 has_pending_route_request_ = false; |
288 requesting_route_for_default_source_ = false; | 289 requesting_route_for_default_source_ = false; |
289 } | 290 } |
290 | 291 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 357 |
357 std::string MediaRouterUI::GetFrameURLHost() const { | 358 std::string MediaRouterUI::GetFrameURLHost() const { |
358 return GetHostFromURL(frame_url_); | 359 return GetHostFromURL(frame_url_); |
359 } | 360 } |
360 | 361 |
361 const std::string& MediaRouterUI::GetRouteProviderExtensionId() const { | 362 const std::string& MediaRouterUI::GetRouteProviderExtensionId() const { |
362 return router_->media_route_provider_extension_id(); | 363 return router_->media_route_provider_extension_id(); |
363 } | 364 } |
364 | 365 |
365 } // namespace media_router | 366 } // namespace media_router |
OLD | NEW |