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

Unified Diff: ash/common/system/tray/system_tray_bubble.h

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed ash_unittests compile errors. Created 4 years, 5 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: ash/common/system/tray/system_tray_bubble.h
diff --git a/ash/common/system/tray/system_tray_bubble.h b/ash/common/system/tray/system_tray_bubble.h
index 7714710d6c2be3ec42391d64c7855cbd2a059cc0..9549a7d02f050199adcb9807b67c07e63e4c1836 100644
--- a/ash/common/system/tray/system_tray_bubble.h
+++ b/ash/common/system/tray/system_tray_bubble.h
@@ -5,10 +5,12 @@
#ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_
#define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_BUBBLE_H_
+#include <map>
#include <memory>
#include <vector>
#include "ash/common/login_status.h"
+#include "ash/common/system/tray/system_tray_item.h"
#include "base/macros.h"
#include "base/timer/timer.h"
#include "ui/views/bubble/tray_bubble_view.h"
@@ -59,6 +61,10 @@ class SystemTrayBubble {
// ShouldShowShelf().
bool ShouldShowShelf() const;
+ // Records metrics for visible system menu rows. Only implemented for the
+ // BUBBLE_TYPE_DEFAULT BubbleType.
+ void RecordVisibleRowMetrics();
+
private:
void CreateItemViews(LoginStatus login_status);
@@ -67,6 +73,9 @@ class SystemTrayBubble {
std::vector<ash::SystemTrayItem*> items_;
BubbleType bubble_type_;
+ // Tracks the View's created in the last call to CreateItemViews().
tdanderson 2016/07/19 21:58:40 View's->views
bruthig 2016/07/20 18:15:52 Done.
+ std::map<SystemTrayItem::ItemType, views::View*> tray_item_view_map_;
+
int autoclose_delay_;
base::OneShotTimer autoclose_;

Powered by Google App Engine
This is Rietveld 408576698