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

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

Issue 2951523002: Media Remoting: Add mojo interfaces between browser and extension. (Closed)
Patch Set: Rebased again. 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
« no previous file with comments | « chrome/browser/media/router/mojo/media_router_mojo_impl.h ('k') | chrome/common/media_router/mojo/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fb6ad4cd3a2154fc8d980570e0bea8cdb896b0dc..ee3c4c685df4c25be7e6cbcd67dd5828feaf6849 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -1021,4 +1021,21 @@ void MediaRouterMojoImpl::OnMediaControllerCreated(
MediaRouterMojoMetrics::RecordMediaRouteControllerCreationResult(success);
}
+void MediaRouterMojoImpl::OnMediaRemoterCreated(
+ int32_t tab_id,
+ media::mojom::MirrorServiceRemoterPtr remoter,
+ media::mojom::MirrorServiceRemotingSourceRequest source_request) {
+ DVLOG_WITH_INSTANCE(1) << __func__ << ": tab_id = " << tab_id;
+
+ auto it = remoting_sources_.find(tab_id);
+ if (it == remoting_sources_.end()) {
+ LOG(WARNING) << __func__
+ << ": No registered remoting source for tab_id = " << tab_id;
+ return;
+ }
+
+ CastRemotingConnector* connector = it->second;
+ connector->ConnectToService(std::move(source_request), std::move(remoter));
+}
+
} // namespace media_router
« no previous file with comments | « chrome/browser/media/router/mojo/media_router_mojo_impl.h ('k') | chrome/common/media_router/mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698