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

Unified Diff: chrome/browser/media/router/media_router.h

Issue 2728543009: [Media Router] Custom Controls 2 - add MediaRouter::GetRouteController() (Closed)
Patch Set: More tests Created 3 years, 9 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.h
diff --git a/chrome/browser/media/router/media_router.h b/chrome/browser/media/router/media_router.h
index 0f8fd4b7386f322a16b2950c04efea0b576f99e2..0be44792b88c12248143f8defe6c86d8c20de412 100644
--- a/chrome/browser/media/router/media_router.h
+++ b/chrome/browser/media/router/media_router.h
@@ -33,6 +33,7 @@ class Origin;
namespace media_router {
class IssuesObserver;
+class MediaRouteController;
class MediaRoutesObserver;
class MediaSinksObserver;
class PresentationConnectionStateObserver;
@@ -189,6 +190,15 @@ class MediaRouter : public KeyedService {
// there is a change to the media routes, subclass MediaRoutesObserver.
virtual std::vector<MediaRoute> GetCurrentRoutes() const = 0;
+ // Returns a nullptr if no MediaRoute exists for the given |route_id|, if a
imcheng 2017/03/28 01:18:37 nit: Remove the "or if on Android" part.
takumif 2017/03/29 02:34:49 Done.
+ // connection with the extension-side controller could not be established,
+ // or if on Android.
mark a. foltz 2017/03/30 23:03:27 or just "if the controller could not be instantiat
+ virtual scoped_refptr<MediaRouteController> GetRouteController(
+ const MediaRoute::Id& route_id) = 0;
+
+ // Called when the MediaRouteController for |route_id| has been destroyed.
imcheng 2017/03/28 01:18:37 nit: Describe what this method does instead of whe
takumif 2017/03/29 02:34:49 Done.
mark a. foltz 2017/03/30 23:03:27 It's virtual so it doesn't do anything. If there
+ virtual void OnRouteControllerDestroyed(const MediaRoute::Id& route_id) = 0;
imcheng 2017/03/28 01:18:37 It probably doesn't make sense for this method to
imcheng 2017/03/28 01:18:37 Naming suggestion: DetachRouteController or Unregi
takumif 2017/03/29 02:34:49 Changing to DetachRouteController().
takumif 2017/03/29 02:34:49 Done.
+
private:
friend class IssuesObserver;
friend class MediaSinksObserver;

Powered by Google App Engine
This is Rietveld 408576698