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

Unified Diff: blimp/client/core/contents/blimp_contents_manager.cc

Issue 2371503002: Add Blimp feedback data about visible BlimpContents. (Closed)
Patch Set: Rebased for good measure Created 4 years, 3 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: 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..ff1c57f1664512492cfd83d97a2928f0aa49fdb2 100644
--- a/blimp/client/core/contents/blimp_contents_manager.cc
+++ b/blimp/client/core/contents/blimp_contents_manager.cc
@@ -97,6 +97,20 @@ BlimpContentsImpl* BlimpContentsManager::GetBlimpContents(int id) {
return nullptr;
}
+std::vector<BlimpContentsImpl*>
+BlimpContentsManager::GetAllActiveBlimpContents() {
+ std::vector<BlimpContentsImpl*> all_blimp_contents;
+ for (const auto& item : observer_map_) {
+ BlimpContentsImpl* blimp_contents =
+ static_cast<BlimpContentsImpl*>(item.second.get()->blimp_contents());
+ if (!blimp_contents) {
+ continue;
+ }
+ all_blimp_contents.push_back(blimp_contents);
+ }
+ return all_blimp_contents;
+}
+
int BlimpContentsManager::CreateBlimpContentsId() {
return next_blimp_contents_id_++;
}
« no previous file with comments | « blimp/client/core/contents/blimp_contents_manager.h ('k') | blimp/client/core/contents/blimp_contents_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698