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

Unified Diff: ash/common/system/tray/system_tray_item.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_item.h
diff --git a/ash/common/system/tray/system_tray_item.h b/ash/common/system/tray/system_tray_item.h
index 09c5f82d7112e85599fcfc318b4d4bdf1fca17f6..e38358f4e96a445dd04571a8674cf737070defdb 100644
--- a/ash/common/system/tray/system_tray_item.h
+++ b/ash/common/system/tray/system_tray_item.h
@@ -20,9 +20,45 @@ class TrayItemView;
class ASH_EXPORT SystemTrayItem {
public:
- explicit SystemTrayItem(SystemTray* system_tray);
+ // The different types of SystemTrayItems.
+ //
+ // *** IMPORTANT *** - These values are used for UMA metrics so do NOT
+ // re-order
+ // this enum and only insert items before the COUNT item.
tdanderson 2016/07/19 21:58:40 nit: awkward line break.
bruthig 2016/07/20 18:15:52 Done.
+ enum ItemType {
+ ACCESSIBILITY, // 0
tdanderson 2016/07/19 21:58:40 Consider making UNKNOWN/NONE the 0-element, and us
bruthig 2016/07/20 18:15:52 Added TEST at 0.
+ AUDIO, // 1
+ BLUETOOTH, // 2
+ CAPS_LOCK, // 3
+ CAST, // 4
+ DATE_POWER_LOCK, // 5
+ DISPLAY, // 6
+ DISPLAY_BRIGHTNESS, // 7
+ ENTERPRISE, // 8
+ IME, // 9
+ MULTI_PROFILE_MEDIA, // 10
+ NETWORK, // 11
+ OS_SETTINGS, // 12
+ OS_UPDATE, // 13
+ POWER, // 14
+ ROTATION_LOCK, // 15
+ SCREEN_CAPTURE, // 16
+ SCREEN_SHARE, // 17
+ SESSION_LENGTH_LIMIT, // 18
+ SMS, // 19
+ SUPERVISED_USER, // 20
+ TRACING, // 21
+ USER, // 22
+ USER_SEPARATOR, // 23
+ VPN, // 24
+ COUNT // 25
+ };
+
+ SystemTrayItem(SystemTray* system_tray, ItemType type);
virtual ~SystemTrayItem();
+ ItemType type() const { return item_type_; }
tdanderson 2016/07/19 21:58:40 I'm a bit concerned that having a public type() in
bruthig 2016/07/20 18:15:52 Renamed ItemType as UmaType, moved uma_type() to p
+
// Create* functions may return NULL if nothing should be displayed for the
// type of view. The default implementations return NULL.
@@ -108,6 +144,7 @@ class ASH_EXPORT SystemTrayItem {
private:
SystemTray* system_tray_;
+ ItemType item_type_;
bool restore_focus_;
DISALLOW_COPY_AND_ASSIGN(SystemTrayItem);

Powered by Google App Engine
This is Rietveld 408576698