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

Unified Diff: chrome/browser/ui/ash/system_tray_client.h

Issue 2360143004: mash: Add SystemTrayClient interface, use to show date settings (Closed)
Patch Set: reparent 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/system_tray_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/system_tray_client.h
diff --git a/chrome/browser/ui/ash/system_tray_controller_mus.h b/chrome/browser/ui/ash/system_tray_client.h
similarity index 35%
rename from chrome/browser/ui/ash/system_tray_controller_mus.h
rename to chrome/browser/ui/ash/system_tray_client.h
index b194f7c4f3fd265edf139fd67d2b6e1cfbd2c02f..1952c2adb363847954182be02f7412217baa128a 100644
--- a/chrome/browser/ui/ash/system_tray_controller_mus.h
+++ b/chrome/browser/ui/ash/system_tray_client.h
@@ -2,26 +2,41 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CONTROLLER_MUS_H_
-#define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CONTROLLER_MUS_H_
+#ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
+#define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
#include "ash/public/interfaces/system_tray.mojom.h"
#include "base/macros.h"
#include "chrome/browser/chromeos/system/system_clock_observer.h"
+#include "mojo/public/cpp/bindings/binding.h"
-// Controls chrome's interaction with the ash system tray menu.
-class SystemTrayControllerMus : public chromeos::system::SystemClockObserver {
+// Handles method calls delegated back to chrome from ash. Also notifies ash of
+// relevant state changes in chrome.
+class SystemTrayClient : public ash::mojom::SystemTrayClient,
+ public chromeos::system::SystemClockObserver {
public:
- SystemTrayControllerMus();
- ~SystemTrayControllerMus() override;
+ SystemTrayClient();
+ ~SystemTrayClient() override;
+
+ static SystemTrayClient* Get();
private:
+ // Connects or reconnects the |system_tray_| interface.
+ void ConnectToSystemTray();
+
+ // Handles errors on the |system_tray_| interface connection.
+ void OnClientConnectionError();
+
+ // ash::mojom::SystemTrayClient:
+ void ShowDateSettings() override;
+
// chromeos::system::SystemClockObserver:
void OnSystemClockChanged(chromeos::system::SystemClock* clock) override;
+ // System tray mojo service in ash.
ash::mojom::SystemTrayPtr system_tray_;
- DISALLOW_COPY_AND_ASSIGN(SystemTrayControllerMus);
+ DISALLOW_COPY_AND_ASSIGN(SystemTrayClient);
};
-#endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CONTROLLER_MUS_H_
+#endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/system_tray_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698