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

Unified Diff: ash/mus/system_tray_delegate_mus.h

Issue 2351893002: mash: Fix system tray clock 12/24 hour time setting (Closed)
Patch Set: review comments 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
new file mode 100644
index 0000000000000000000000000000000000000000..e0a6270a287fc5deac4a19a590e6823e98f07a7c
--- /dev/null
+++ b/ash/mus/system_tray_delegate_mus.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_
+#define ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_
+
+#include "ash/common/system/tray/default_system_tray_delegate.h"
+#include "ash/public/interfaces/system_tray.mojom.h"
+#include "base/i18n/time_formatting.h"
+#include "base/macros.h"
+
+namespace ash {
+
+// Handles the settings displayed in the system tray menu. For mus most settings
+// are obtained from chrome browser via mojo IPC. For the classic ash version
+// see SystemTrayDelegateChromeOS.
+//
+// TODO: Support all methods in SystemTrayDelegate. http://crbug.com/647412.
+class SystemTrayDelegateMus : public DefaultSystemTrayDelegate,
+ public mojom::SystemTray {
+ public:
+ SystemTrayDelegateMus();
+ ~SystemTrayDelegateMus() override;
+
+ static SystemTrayDelegateMus* Get();
+
+ private:
+ // SystemTrayDelegate:
+ base::HourClockType GetHourClockType() const override;
+
+ // mojom::SystemTray:
+ void SetUse24HourClock(bool use_24_hour) override;
+
+ // 12 or 24 hour display.
+ base::HourClockType hour_clock_type_;
+
+ DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateMus);
+};
+
+} // namespace ash
+
+#endif // ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_

Powered by Google App Engine
This is Rietveld 408576698