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

Unified Diff: chrome/browser/ui/ash/cast_config_delegate_media_router.h

Issue 2424183002: Remove Chromecast extension support from cast system tray menu. (Closed)
Patch Set: Initial patch Created 4 years, 2 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/ui/ash/cast_config_delegate_media_router.h
diff --git a/chrome/browser/ui/ash/cast_config_delegate_media_router.h b/chrome/browser/ui/ash/cast_config_delegate_media_router.h
index d4a94db0d8316e465c632cfaad3fb521f7a76b1d..d5a53f1e379241c1392da7ffa9f4fef03c507bd8 100644
--- a/chrome/browser/ui/ash/cast_config_delegate_media_router.h
+++ b/chrome/browser/ui/ash/cast_config_delegate_media_router.h
@@ -8,6 +8,8 @@
#include "ash/common/cast_config_delegate.h"
#include "base/macros.h"
#include "base/observer_list.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
namespace media_router {
class MediaRouter;
@@ -16,32 +18,34 @@ class MediaRouter;
class CastDeviceCache;
// A class which allows the ash tray to communicate with the media router.
-class CastConfigDelegateMediaRouter : public ash::CastConfigDelegate {
+class CastConfigDelegateMediaRouter : public ash::CastConfigDelegate,
achuithb 2016/10/27 19:38:59 We can now fold this delegate into CastConfigDeleg
jdufault 2016/10/31 21:12:08 Right, this is still used for dependency injection
+ public content::NotificationObserver {
public:
CastConfigDelegateMediaRouter();
~CastConfigDelegateMediaRouter() override;
- // The MediaRouter is not always enabled. We only use this backend when it is
- // enabled.
- static bool IsEnabled();
static void SetMediaRouterForTest(media_router::MediaRouter* media_router);
private:
// CastConfigDelegate:
- bool HasCastExtension() const override;
void RequestDeviceRefresh() override;
- void CastToReceiver(const std::string& receiver_id) override;
- void StopCasting(const std::string& route_id) override;
- bool HasOptions() const override;
- void LaunchCastOptions() override;
+ void CastToReceiver(const Sink& sink) override;
+ void StopCasting(const Route& route) override;
void AddObserver(ash::CastConfigDelegate::Observer* observer) override;
void RemoveObserver(ash::CastConfigDelegate::Observer* observer) override;
+ // content::NotificationObserver:
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
+
// |devices_| stores the current source/route status that we query from.
// This will return null until the media router is initialized.
CastDeviceCache* devices();
std::unique_ptr<CastDeviceCache> devices_;
+ content::NotificationRegistrar registrar_;
+
base::ObserverList<ash::CastConfigDelegate::Observer> observer_list_;
DISALLOW_COPY_AND_ASSIGN(CastConfigDelegateMediaRouter);

Powered by Google App Engine
This is Rietveld 408576698