summaryrefslogtreecommitdiffstats
path: root/chrome/browser/media/router/media_router_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/media/router/media_router_base.h')
-rw-r--r--chrome/browser/media/router/media_router_base.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/media/router/media_router_base.h b/chrome/browser/media/router/media_router_base.h
index d342d9b..41a7c43 100644
--- a/chrome/browser/media/router/media_router_base.h
+++ b/chrome/browser/media/router/media_router_base.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_
#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_BASE_H_
+#include <set>
+
#include "base/callback_list.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/gtest_prod_util.h"
@@ -12,6 +14,8 @@
#include "base/threading/thread_checker.h"
#include "chrome/browser/media/router/media_router.h"
+class Profile;
+
namespace media_router {
class MediaRouterBase : public MediaRouter {
@@ -25,6 +29,10 @@ class MediaRouterBase : public MediaRouter {
const content::PresentationConnectionStateChangedCallback& callback)
override;
+ // Called when the off the record (incognito) profile for this instance is
+ // being shut down. This will terminate all off the record media routes.
+ void OnOffTheRecordProfileShutdown() override;
+
protected:
FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest,
PresentationConnectionStateChangedCallback);
@@ -39,6 +47,11 @@ class MediaRouterBase : public MediaRouter {
content::PresentationConnectionCloseReason reason,
const std::string& message);
+ // Called when off the record route |route_id| has been created.
+ void OnOffTheRecordRouteCreated(const MediaRoute::Id& route_id);
+ // Called when route |route_id| has been terminated.
+ void OnRouteTerminated(const MediaRoute::Id& route_id);
+
using PresentationConnectionStateChangedCallbacks = base::CallbackList<void(
const content::PresentationConnectionStateChangeInfo&)>;
base::ScopedPtrHashMap<
@@ -54,6 +67,9 @@ class MediaRouterBase : public MediaRouter {
void OnPresentationConnectionStateCallbackRemoved(
const MediaRoute::Id& route_id);
+ // Ids of current off the record media routes.
+ std::set<MediaRoute::Id> off_the_record_route_ids_;
+
DISALLOW_COPY_AND_ASSIGN(MediaRouterBase);
};