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

Unified Diff: ash/mus/system_tray_delegate_mus.h

Issue 2360143004: mash: Add SystemTrayClient interface, use to show date settings (Closed)
Patch Set: format 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.h
diff --git a/ash/mus/system_tray_delegate_mus.h b/ash/mus/system_tray_delegate_mus.h
index e0a6270a287fc5deac4a19a590e6823e98f07a7c..c67b3dfb525c714c6683af49e1357eea6c293b2b 100644
--- a/ash/mus/system_tray_delegate_mus.h
+++ b/ash/mus/system_tray_delegate_mus.h
@@ -10,6 +10,10 @@
#include "base/i18n/time_formatting.h"
#include "base/macros.h"
+namespace shell {
+class Connector;
+}
+
namespace ash {
// Handles the settings displayed in the system tray menu. For mus most settings
@@ -20,21 +24,36 @@ namespace ash {
class SystemTrayDelegateMus : public DefaultSystemTrayDelegate,
public mojom::SystemTray {
public:
- SystemTrayDelegateMus();
+ explicit SystemTrayDelegateMus(shell::Connector* connector);
~SystemTrayDelegateMus() override;
static SystemTrayDelegateMus* Get();
private:
+ // Connects or reconnects the |system_tray_client_| interface.
+ void ConnectToSystemTrayClient();
+
+ // Handles errors on the |system_tray_client_| interface connection.
+ void OnClientConnectionError();
+
// SystemTrayDelegate:
base::HourClockType GetHourClockType() const override;
+ void ShowDateSettings() override;
// mojom::SystemTray:
void SetUse24HourClock(bool use_24_hour) override;
+ shell::Connector* connector_;
+
+ // Client interface in chrome browser.
+ mojom::SystemTrayClientPtr system_tray_client_;
+
// 12 or 24 hour display.
base::HourClockType hour_clock_type_;
+ // Message loop may spin after this object is deleted during shutdown.
+ base::WeakPtrFactory<SystemTrayDelegateMus> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateMus);
};

Powered by Google App Engine
This is Rietveld 408576698