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

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

Issue 2138013003: media::mojom::Remoter and CastRemotingConnector/Sender (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split-out some interfaces in prep for landing multi-part changes. Created 4 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.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);
« no previous file with comments | « chrome/browser/media/router/mojo/media_router.mojom ('k') | chrome/browser/media/router/mojo/media_router_mojo_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698