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

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

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: 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 38%
rename from chrome/browser/ui/ash/system_tray_controller_mus.h
rename to chrome/browser/ui/ash/system_tray_client.h
index b194f7c4f3fd265edf139fd67d2b6e1cfbd2c02f..4916ff4e621d2e9d44e83ac90a48e9dfa59c303c 100644
--- a/chrome/browser/ui/ash/system_tray_controller_mus.h
+++ b/chrome/browser/ui/ash/system_tray_client.h
@@ -2,26 +2,36 @@
// 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,
James Cook 2016/09/22 23:19:18 I went with this class being SystemTrayClient beca
sky 2016/09/23 16:42:26 What you have SGTM.
+ public chromeos::system::SystemClockObserver {
public:
- SystemTrayControllerMus();
- ~SystemTrayControllerMus() override;
+ SystemTrayClient();
+ ~SystemTrayClient() override;
private:
+ // 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);
+ // Binds the SystemTrayClient mojo interface to this object.
+ mojo::Binding<ash::mojom::SystemTrayClient> binding_;
James Cook 2016/09/22 23:19:18 Is this the right binding type?
sky 2016/09/23 16:42:26 The other one you could use is StrongBinding. Stro
+
+ DISALLOW_COPY_AND_ASSIGN(SystemTrayClient);
};
-#endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CONTROLLER_MUS_H_
+#endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698