Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4665)

Unified Diff: chrome/browser/media/router/mojo/media_router_mojo_impl.cc

Issue 2965843002: [Media Router] Support dual discovery (Closed)
Patch Set: resovle code review comments from Derek and Mark Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/mojo/media_router_mojo_impl.cc
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
index b95b155e10ace1eab2e78cc7105fb7d212b72dbf..4be4febcccbf3e7bfc59b430e8f398db9dab11a6 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -976,16 +976,6 @@ void MediaRouterMojoImpl::StartDiscovery() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DVLOG_WITH_INSTANCE(1) << "StartDiscovery";
- if (media_router::DialLocalDiscoveryEnabled()) {
- if (!dial_media_sink_service_proxy_) {
- dial_media_sink_service_proxy_ = new DialMediaSinkServiceProxy(
- base::Bind(&MediaRouterMojoImpl::ProvideSinks,
- weak_factory_.GetWeakPtr(), "dial"),
- context_);
- }
- dial_media_sink_service_proxy_->Start();
- }
-
if (media_router::CastDiscoveryEnabled()) {
if (!cast_media_sink_service_) {
cast_media_sink_service_ = new CastMediaSinkService(
@@ -995,6 +985,18 @@ void MediaRouterMojoImpl::StartDiscovery() {
}
cast_media_sink_service_->Start();
}
+
+ if (media_router::DialLocalDiscoveryEnabled()) {
+ if (!dial_media_sink_service_proxy_) {
+ dial_media_sink_service_proxy_ = new DialMediaSinkServiceProxy(
+ base::Bind(&MediaRouterMojoImpl::ProvideSinks,
+ weak_factory_.GetWeakPtr(), "dial"),
+ context_);
+ dial_media_sink_service_proxy_->SetDialMediaSinkServiceDelegate(
+ cast_media_sink_service_.get());
+ }
+ dial_media_sink_service_proxy_->Start();
+ }
}
void MediaRouterMojoImpl::UpdateMediaSinks(

Powered by Google App Engine
This is Rietveld 408576698