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

Unified Diff: chrome/browser/ui/ash/cast_config_delegate_chromeos.cc

Issue 1567103005: Replace base::CallbackList with base::ObserverList in CastConfigDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Add TODO for proper fix Created 4 years, 11 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_chromeos.cc
diff --git a/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc b/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc
index 2a210710c50458c2628a5fa54a0a0b4d1235c029..5333260d22e6cde6cd15c866b614a3e8d5f86c3c 100644
--- a/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc
@@ -65,13 +65,6 @@ bool CastConfigDelegateChromeos::HasCastExtension() const {
return FindCastExtension() != nullptr;
}
-CastConfigDelegateChromeos::DeviceUpdateSubscription
-CastConfigDelegateChromeos::RegisterDeviceUpdateObserver(
- const ReceiversAndActivitesCallback& callback) {
- auto listeners = extensions::CastDeviceUpdateListeners::Get(GetProfile());
- return listeners->RegisterCallback(callback);
-}
-
void CastConfigDelegateChromeos::RequestDeviceRefresh() {
scoped_ptr<base::ListValue> args =
extensions::api::cast_devices_private::UpdateDevicesRequested::Create();
@@ -120,4 +113,16 @@ void CastConfigDelegateChromeos::LaunchCastOptions() {
chrome::Navigate(&params);
}
+void CastConfigDelegateChromeos::AddObserver(
+ ash::CastConfigDelegate::Observer* observer) {
+ return extensions::CastDeviceUpdateListeners::Get(GetProfile())
+ ->AddObserver(observer);
+}
+
+void CastConfigDelegateChromeos::RemoveObserver(
+ ash::CastConfigDelegate::Observer* observer) {
+ return extensions::CastDeviceUpdateListeners::Get(GetProfile())
+ ->RemoveObserver(observer);
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/ui/ash/cast_config_delegate_chromeos.h ('k') | chrome/browser/ui/ash/cast_config_delegate_media_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698