| 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 0b70d72a5f932196e64a6c3c203750810f710d8e..6d1092dccd6570b48948f6fb6cd348d642c07053 100644
|
| --- a/chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.h
|
| @@ -8,7 +8,6 @@
|
| #include <stdint.h>
|
|
|
| #include <deque>
|
| -#include <map>
|
| #include <memory>
|
| #include <set>
|
| #include <string>
|
| @@ -27,6 +26,7 @@
|
| #include "chrome/browser/media/router/issue_manager.h"
|
| #include "chrome/browser/media/router/media_router_base.h"
|
| #include "chrome/browser/media/router/media_routes_observer.h"
|
| +#include "chrome/browser/media/router/mojo/media_remoter.mojom.h"
|
| #include "chrome/browser/media/router/mojo/media_router.mojom.h"
|
| #include "mojo/public/cpp/bindings/binding.h"
|
|
|
| @@ -41,6 +41,7 @@ class Extension;
|
|
|
| namespace media_router {
|
|
|
| +class MediaRemotingSessionImpl;
|
| enum class MediaRouteProviderWakeReason;
|
|
|
| // MediaRouter implementation that delegates calls to the component extension.
|
| @@ -305,6 +306,13 @@ class MediaRouterMojoImpl : public MediaRouterBase,
|
| void OnRouteMessagesReceived(
|
| const mojo::String& route_id,
|
| mojo::Array<interfaces::RouteMessagePtr> messages) override;
|
| + void CreateRemotingSession(
|
| + const mojo::String& media_source,
|
| + interfaces::MediaRemotingProviderPtr provider,
|
| + const CreateRemotingSessionCallback& callback) override;
|
| +
|
| + void OnRemotingSessionTerminated(const MediaSource::Id& media_source);
|
| + void TerminateAllRemotingSessions(const std::string& error_reason);
|
|
|
| // Converts the callback result of calling Mojo CreateRoute()/JoinRoute()
|
| // into a local callback.
|
| @@ -426,6 +434,10 @@ class MediaRouterMojoImpl : public MediaRouterBase,
|
| bool should_enable_mdns_discovery_ = false;
|
| #endif
|
|
|
| + // Owned set of currently-active media remoting sessions.
|
| + std::unordered_map<MediaSource::Id, std::unique_ptr<MediaRemotingSessionImpl>>
|
| + remoting_sessions_;
|
| +
|
| base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl);
|
|
|