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

Unified Diff: ash/system/tray/system_tray.cc

Issue 1218653006: Add support code to test the cast system tray item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 5 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/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index baca0ad2c61e803374d722b02be2f85c958f4867..d23cc7873bc3e4324fcbd2dd984cbc04342aeee5 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -182,7 +182,8 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(new TrayVPN(this));
AddTrayItem(new TraySms(this));
AddTrayItem(new TrayBluetooth(this));
- AddTrayItem(new TrayCast(this));
+ tray_cast_ = new TrayCast(this);
+ AddTrayItem(tray_cast_);
AddTrayItem(new TrayDisplay(this));
screen_capture_tray_item_ = new ScreenCaptureTrayItem(this);
AddTrayItem(screen_capture_tray_item_);
@@ -205,7 +206,6 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
#elif defined(OS_LINUX)
AddTrayItem(tray_accessibility_);
AddTrayItem(new TrayBluetooth(this));
- AddTrayItem(new TrayCast(this));
AddTrayItem(new TrayUpdate(this));
AddTrayItem(tray_date_);
#endif
@@ -694,6 +694,8 @@ views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) {
return it == tray_item_map_.end() ? NULL : it->second;
}
+TrayCast* SystemTray::GetTrayCastForTesting() const { return tray_cast_; }
+
TrayDate* SystemTray::GetTrayDateForTesting() const { return tray_date_; }
bool SystemTray::PerformAction(const ui::Event& event) {

Powered by Google App Engine
This is Rietveld 408576698