Chromium Code Reviews| Index: blimp/client/core/contents/blimp_contents_manager.cc |
| diff --git a/blimp/client/core/contents/blimp_contents_manager.cc b/blimp/client/core/contents/blimp_contents_manager.cc |
| index 3bf40972fa61917afa087dcb650f8e6867bd7edf..a0d83fb45f3efb2dda68820736582fe9a7efc1ef 100644 |
| --- a/blimp/client/core/contents/blimp_contents_manager.cc |
| +++ b/blimp/client/core/contents/blimp_contents_manager.cc |
| @@ -97,6 +97,16 @@ BlimpContentsImpl* BlimpContentsManager::GetBlimpContents(int id) { |
| return nullptr; |
| } |
| +std::vector<BlimpContentsImpl*> |
| +BlimpContentsManager::GetAllActiveBlimpContents() { |
| + std::vector<BlimpContentsImpl*> all_blimp_contents; |
| + for (const auto& item : observer_map_) { |
| + all_blimp_contents.push_back( |
|
David Trainor- moved to gerrit
2016/09/27 03:49:26
Check if the contents is null or not. We do a pos
nyquist
2016/09/27 06:21:29
Wow! Good catch, thanks! Fixed now. I also of cour
|
| + static_cast<BlimpContentsImpl*>(item.second.get()->blimp_contents())); |
| + } |
| + return all_blimp_contents; |
| +} |
| + |
| int BlimpContentsManager::CreateBlimpContentsId() { |
| return next_blimp_contents_id_++; |
| } |