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

Side by Side Diff: chrome/browser/ui/ash/cast_config_delegate_media_router.cc

Issue 2424853003: Remove FOR_EACH_OBSERVER macro usage in chrome/browser/ui (Closed)
Patch Set: explicit types 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h" 5 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 item.activity.tab_id = 0; 198 item.activity.tab_id = 0;
199 if (media_router::IsDesktopMirroringMediaSource(route.media_source())) 199 if (media_router::IsDesktopMirroringMediaSource(route.media_source()))
200 item.activity.tab_id = Activity::TabId::DESKTOP; 200 item.activity.tab_id = Activity::TabId::DESKTOP;
201 } 201 }
202 202
203 break; 203 break;
204 } 204 }
205 } 205 }
206 } 206 }
207 207
208 FOR_EACH_OBSERVER(ash::CastConfigDelegate::Observer, observer_list_, 208 for (ash::CastConfigDelegate::Observer& observer : observer_list_)
209 OnDevicesUpdated(items)); 209 observer.OnDevicesUpdated(items);
210 } 210 }
211 211
212 void CastConfigDelegateMediaRouter::CastToReceiver( 212 void CastConfigDelegateMediaRouter::CastToReceiver(
213 const std::string& receiver_id) { 213 const std::string& receiver_id) {
214 // TODO(imcheng): Pass in tab casting timeout. 214 // TODO(imcheng): Pass in tab casting timeout.
215 GetMediaRouter()->CreateRoute( 215 GetMediaRouter()->CreateRoute(
216 media_router::MediaSourceForDesktop().id(), receiver_id, 216 media_router::MediaSourceForDesktop().id(), receiver_id,
217 GURL("http://cros-cast-origin/"), nullptr, 217 GURL("http://cros-cast-origin/"), nullptr,
218 std::vector<media_router::MediaRouteResponseCallback>(), 218 std::vector<media_router::MediaRouteResponseCallback>(),
219 base::TimeDelta(), false); 219 base::TimeDelta(), false);
(...skipping 12 matching lines...) Expand all
232 232
233 void CastConfigDelegateMediaRouter::AddObserver( 233 void CastConfigDelegateMediaRouter::AddObserver(
234 ash::CastConfigDelegate::Observer* observer) { 234 ash::CastConfigDelegate::Observer* observer) {
235 observer_list_.AddObserver(observer); 235 observer_list_.AddObserver(observer);
236 } 236 }
237 237
238 void CastConfigDelegateMediaRouter::RemoveObserver( 238 void CastConfigDelegateMediaRouter::RemoveObserver(
239 ash::CastConfigDelegate::Observer* observer) { 239 ash::CastConfigDelegate::Observer* observer) {
240 observer_list_.RemoveObserver(observer); 240 observer_list_.RemoveObserver(observer);
241 } 241 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_sync_ui_state.cc ('k') | chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698