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

Unified Diff: chrome/browser/media/router/media_router_base.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
Index: chrome/browser/media/router/media_router_base.cc
diff --git a/chrome/browser/media/router/media_router_base.cc b/chrome/browser/media/router/media_router_base.cc
index d3ec5e6aeb2ed135af64e4a82f992a7bad4fc4f1..e29be4ccecfceb2d6d7915420196debbf55369d6 100644
--- a/chrome/browser/media/router/media_router_base.cc
+++ b/chrome/browser/media/router/media_router_base.cc
@@ -155,4 +155,21 @@ void MediaRouterBase::Shutdown() {
void MediaRouterBase::DetachRouteController(const MediaRoute::Id& route_id,
MediaRouteController* controller) {}
+void MediaRouterBase::RegisterRemotingSource(
+ int32_t tab_id,
+ CastRemotingConnector* remoting_source) {
+ auto it = remoting_sources_.find(tab_id);
+ if (it != remoting_sources_.end()) {
+ DCHECK(remoting_source == it->second);
+ return;
+ }
+ remoting_sources_.emplace(tab_id, remoting_source);
+}
+
+void MediaRouterBase::UnregisterRemotingSource(int32_t tab_id) {
+ auto it = remoting_sources_.find(tab_id);
+ DCHECK(it != remoting_sources_.end());
+ remoting_sources_.erase(it);
+}
+
} // namespace media_router
« no previous file with comments | « chrome/browser/media/router/media_router_base.h ('k') | chrome/browser/media/router/mojo/media_router_mojo_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698