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

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

Issue 2148943002: mash: Create system tray display and rotation lock items via delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index b9b8141f17e0e7eb8021c01f73d1a188fc9a1505..f24a7a13396d42fb27441862eb21382db3ef75b4 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -197,7 +197,10 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(new TrayBluetooth(this));
tray_cast_ = new TrayCast(this);
AddTrayItem(tray_cast_);
- AddTrayItem(new TrayDisplay(this));
+ std::unique_ptr<SystemTrayItem> tray_display =
msw 2016/07/13 18:51:49 optional nit: add a comment?
James Cook 2016/07/13 21:30:46 Done.
+ delegate->CreateDisplayTrayItem(this);
+ if (tray_display)
+ AddTrayItem(tray_display.release());
screen_capture_tray_item_ = new ScreenCaptureTrayItem(this);
AddTrayItem(screen_capture_tray_item_);
screen_share_tray_item_ = new ScreenShareTrayItem(this);
@@ -233,10 +236,6 @@ void SystemTray::AddTrayItem(SystemTrayItem* item) {
}
}
-void SystemTray::RemoveTrayItem(SystemTrayItem* item) {
- NOTIMPLEMENTED();
-}
-
const std::vector<SystemTrayItem*>& SystemTray::GetTrayItems() const {
return items_.get();
}

Powered by Google App Engine
This is Rietveld 408576698