| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |