| 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_
|
|
|