| Index: blimp/client/core/feedback/blimp_feedback_data.cc
|
| diff --git a/blimp/client/core/feedback/blimp_feedback_data.cc b/blimp/client/core/feedback/blimp_feedback_data.cc
|
| index b9b4a99801deb2d6d98ffc22842ed51e12c06c69..4532269817eff892e653a88221ca38b2ad89b3d3 100644
|
| --- a/blimp/client/core/feedback/blimp_feedback_data.cc
|
| +++ b/blimp/client/core/feedback/blimp_feedback_data.cc
|
| @@ -4,13 +4,33 @@
|
|
|
| #include "blimp/client/core/feedback/blimp_feedback_data.h"
|
|
|
| +#include "blimp/client/core/contents/blimp_contents_manager.h"
|
| +
|
| namespace blimp {
|
| namespace client {
|
| const char kFeedbackSupportedKey[] = "Blimp Supported";
|
| +const char kFeedbackHasVisibleBlimpContents[] = "Blimp Visible";
|
| +
|
| +namespace {
|
| +std::string HasVisibleBlimpContents(
|
| + BlimpContentsManager* blimp_contents_manager) {
|
| + std::vector<BlimpContentsImpl*> all_blimp_contents =
|
| + blimp_contents_manager->GetAllActiveBlimpContents();
|
| + for (const auto& item : all_blimp_contents) {
|
| + if (item->compositor_manager()->visible()) {
|
| + return "true";
|
| + }
|
| + }
|
| + return "false";
|
| +}
|
| +} // namespace
|
|
|
| -std::unordered_map<std::string, std::string> CreateBlimpFeedbackData() {
|
| +std::unordered_map<std::string, std::string> CreateBlimpFeedbackData(
|
| + BlimpContentsManager* blimp_contents_manager) {
|
| std::unordered_map<std::string, std::string> data;
|
| data.insert(std::make_pair(kFeedbackSupportedKey, "true"));
|
| + data.insert(std::make_pair(kFeedbackHasVisibleBlimpContents,
|
| + HasVisibleBlimpContents(blimp_contents_manager)));
|
| return data;
|
| }
|
|
|
|
|