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

Unified Diff: ash/mus/system_tray_delegate_mus.cc

Issue 2360143004: mash: Add SystemTrayClient interface, use to show date settings (Closed)
Patch Set: tweaks, similarity Created 4 years, 3 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/mus/system_tray_delegate_mus.cc
diff --git a/ash/mus/system_tray_delegate_mus.cc b/ash/mus/system_tray_delegate_mus.cc
index 8add535aa2bf63f0e61f51d57121d91a21396604..cb91ccd11b10988daabf14d58d3bf24469861e29 100644
--- a/ash/mus/system_tray_delegate_mus.cc
+++ b/ash/mus/system_tray_delegate_mus.cc
@@ -36,6 +36,18 @@ base::HourClockType SystemTrayDelegateMus::GetHourClockType() const {
return hour_clock_type_;
}
+void SystemTrayDelegateMus::ShowDateSettings() {
+ system_tray_client_->ShowDateSettings();
James Cook 2016/09/22 23:19:18 Is there a naming convention for these interfacept
sky 2016/09/23 16:42:26 How do you know SetClient() has been called by the
sky 2016/09/23 16:42:26 'client_' is actually used a fair amount. And no,
+}
+
+void SystemTrayDelegateMus::SetClient(
+ mojom::SystemTrayClientPtr system_tray_client) {
+ DCHECK(system_tray_client);
+ DCHECK(!system_tray_client_);
+ system_tray_client_ = std::move(system_tray_client);
+ // No special client connection error handling.
James Cook 2016/09/22 23:19:18 Not sure if I need set_connection_error_handler()
sky 2016/09/23 16:42:25 It's only necessary if you want to take action if
+}
+
void SystemTrayDelegateMus::SetUse24HourClock(bool use_24_hour) {
hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock;
WmShell::Get()->system_tray_notifier()->NotifyDateFormatChanged();

Powered by Google App Engine
This is Rietveld 408576698