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

Side by Side Diff: chrome/browser/ui/webui/media_router/query_result_manager.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/webui/media_router/query_result_manager.h" 5 #include "chrome/browser/ui/webui/media_router/query_result_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 }) == sources.end(); 225 }) == sources.end();
226 } 226 }
227 227
228 void QueryResultManager::NotifyOnResultsUpdated() { 228 void QueryResultManager::NotifyOnResultsUpdated() {
229 std::vector<MediaSinkWithCastModes> sinks; 229 std::vector<MediaSinkWithCastModes> sinks;
230 for (const auto& sink_pair : all_sinks_) { 230 for (const auto& sink_pair : all_sinks_) {
231 MediaSinkWithCastModes sink_with_cast_modes(sink_pair.first); 231 MediaSinkWithCastModes sink_with_cast_modes(sink_pair.first);
232 sink_with_cast_modes.cast_modes = sink_pair.second.GetCastModes(); 232 sink_with_cast_modes.cast_modes = sink_pair.second.GetCastModes();
233 sinks.push_back(sink_with_cast_modes); 233 sinks.push_back(sink_with_cast_modes);
234 } 234 }
235 FOR_EACH_OBSERVER(QueryResultManager::Observer, observers_, 235 for (QueryResultManager::Observer& observer : observers_)
236 OnResultsUpdated(sinks)); 236 observer.OnResultsUpdated(sinks);
237 } 237 }
238 238
239 } // namespace media_router 239 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/touch_view_controller_delegate.cc ('k') | chrome/browser/ui/webui/signin/login_ui_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698