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

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

Issue 2951523002: Media Remoting: Add mojo interfaces between browser and extension. (Closed)
Patch Set: Fix compile failure on Android bots. Created 3 years, 6 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.h
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.h b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
index d1c6c00cdabf348dc77501b77c1ab34bf00674c3..4ce3a61ddb6ba2a8328d37f47c822f5e8d96b4c5 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
@@ -248,6 +248,10 @@ class MediaRouterMojoImpl : public MediaRouterBase,
void UnregisterRouteMessageObserver(RouteMessageObserver* observer) override;
void DetachRouteController(const MediaRoute::Id& route_id,
MediaRouteController* controller) override;
+ void RegisterRemotingSource(int32_t tab_id,
+ CastRemotingConnector* connector) override;
+ void UnRegisterRemotingSource(int32_t tab_id,
+ CastRemotingConnector* connector) override;
// Notifies |observer| of any existing cached routes, if it is still
// registered.
@@ -342,6 +346,10 @@ class MediaRouterMojoImpl : public MediaRouterBase,
void OnRouteMessagesReceived(
const std::string& route_id,
const std::vector<RouteMessage>& messages) override;
+ void OnMediaRemoterCreated(
+ int32_t tab_id,
+ media::mojom::MirrorServiceRemoterPtr remoter,
+ media::mojom::MirrorServiceRemotingSourceRequest source_request) override;
// Result callback when Mojo terminateRoute is invoked. |route_id| is bound
// to the ID of the route that was terminated.
@@ -485,6 +493,11 @@ class MediaRouterMojoImpl : public MediaRouterBase,
bool should_enable_mdns_discovery_ = false;
#endif
+ // Stores CastRemotingConnectors that can be connected to the MediaRemoter
+ // for media remoting when OnMediaRemoterCreated() is called. The map uses the
+ // tab ID as the key.
+ std::unordered_map<int32_t, CastRemotingConnector*> remoting_sources_;
+
base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);

Powered by Google App Engine
This is Rietveld 408576698