| 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/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 route_creation_timer_.Start( | 343 route_creation_timer_.Start( |
| 344 FROM_HERE, base::TimeDelta::FromSeconds(kCreateRouteTimeoutSeconds), this, | 344 FROM_HERE, base::TimeDelta::FromSeconds(kCreateRouteTimeoutSeconds), this, |
| 345 &MediaRouterUI::RouteCreationTimeout); | 345 &MediaRouterUI::RouteCreationTimeout); |
| 346 | 346 |
| 347 router_->CreateRoute(source.id(), sink_id, origin, initiator_, | 347 router_->CreateRoute(source.id(), sink_id, origin, initiator_, |
| 348 route_response_callbacks); | 348 route_response_callbacks); |
| 349 return true; | 349 return true; |
| 350 } | 350 } |
| 351 | 351 |
| 352 void MediaRouterUI::CloseRoute(const MediaRoute::Id& route_id) { | 352 void MediaRouterUI::CloseRoute(const MediaRoute::Id& route_id) { |
| 353 router_->CloseRoute(route_id); | 353 router_->TerminateRoute(route_id); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void MediaRouterUI::AddIssue(const Issue& issue) { router_->AddIssue(issue); } | 356 void MediaRouterUI::AddIssue(const Issue& issue) { router_->AddIssue(issue); } |
| 357 | 357 |
| 358 void MediaRouterUI::ClearIssue(const std::string& issue_id) { | 358 void MediaRouterUI::ClearIssue(const std::string& issue_id) { |
| 359 router_->ClearIssue(issue_id); | 359 router_->ClearIssue(issue_id); |
| 360 } | 360 } |
| 361 | 361 |
| 362 void MediaRouterUI::OnResultsUpdated( | 362 void MediaRouterUI::OnResultsUpdated( |
| 363 const std::vector<MediaSinkWithCastModes>& sinks) { | 363 const std::vector<MediaSinkWithCastModes>& sinks) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 ? GetExtensionName(gurl, extensions::ExtensionRegistry::Get( | 435 ? GetExtensionName(gurl, extensions::ExtensionRegistry::Get( |
| 436 Profile::FromWebUI(web_ui()))) | 436 Profile::FromWebUI(web_ui()))) |
| 437 : TruncateHost(GetHostFromURL(gurl)); | 437 : TruncateHost(GetHostFromURL(gurl)); |
| 438 } | 438 } |
| 439 | 439 |
| 440 const std::string& MediaRouterUI::GetRouteProviderExtensionId() const { | 440 const std::string& MediaRouterUI::GetRouteProviderExtensionId() const { |
| 441 return router_->media_route_provider_extension_id(); | 441 return router_->media_route_provider_extension_id(); |
| 442 } | 442 } |
| 443 | 443 |
| 444 } // namespace media_router | 444 } // namespace media_router |
| OLD | NEW |