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 <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/guid.h" | 10 #include "base/guid.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 route_creation_timer_.Start( | 360 route_creation_timer_.Start( |
361 FROM_HERE, base::TimeDelta::FromSeconds(kCreateRouteTimeoutSeconds), this, | 361 FROM_HERE, base::TimeDelta::FromSeconds(kCreateRouteTimeoutSeconds), this, |
362 &MediaRouterUI::RouteCreationTimeout); | 362 &MediaRouterUI::RouteCreationTimeout); |
363 | 363 |
364 router_->CreateRoute(source.id(), sink_id, origin, initiator_, | 364 router_->CreateRoute(source.id(), sink_id, origin, initiator_, |
365 route_response_callbacks); | 365 route_response_callbacks); |
366 return true; | 366 return true; |
367 } | 367 } |
368 | 368 |
369 void MediaRouterUI::CloseRoute(const MediaRoute::Id& route_id) { | 369 void MediaRouterUI::CloseRoute(const MediaRoute::Id& route_id) { |
370 router_->CloseRoute(route_id); | 370 router_->TerminateRoute(route_id); |
371 } | 371 } |
372 | 372 |
373 void MediaRouterUI::AddIssue(const Issue& issue) { router_->AddIssue(issue); } | 373 void MediaRouterUI::AddIssue(const Issue& issue) { router_->AddIssue(issue); } |
374 | 374 |
375 void MediaRouterUI::ClearIssue(const std::string& issue_id) { | 375 void MediaRouterUI::ClearIssue(const std::string& issue_id) { |
376 router_->ClearIssue(issue_id); | 376 router_->ClearIssue(issue_id); |
377 } | 377 } |
378 | 378 |
379 void MediaRouterUI::OnResultsUpdated( | 379 void MediaRouterUI::OnResultsUpdated( |
380 const std::vector<MediaSinkWithCastModes>& sinks) { | 380 const std::vector<MediaSinkWithCastModes>& sinks) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 | 496 |
497 void MediaRouterUI::OnUIInitialDataReceived() { | 497 void MediaRouterUI::OnUIInitialDataReceived() { |
498 if (!start_time_.is_null()) { | 498 if (!start_time_.is_null()) { |
499 MediaRouterMetrics::RecordMediaRouterDialogLoaded( | 499 MediaRouterMetrics::RecordMediaRouterDialogLoaded( |
500 base::Time::Now() - start_time_); | 500 base::Time::Now() - start_time_); |
501 start_time_ = base::Time(); | 501 start_time_ = base::Time(); |
502 } | 502 } |
503 } | 503 } |
504 | 504 |
505 } // namespace media_router | 505 } // namespace media_router |
OLD | NEW |