| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ | 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ |
| 7 | 7 |
| 8 #include "ash/public/interfaces/system_tray.mojom.h" | 8 #include "ash/public/interfaces/system_tray.mojom.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/chromeos/system/system_clock_observer.h" | 10 #include "chrome/browser/chromeos/system/system_clock_observer.h" |
| 11 #include "mojo/public/cpp/bindings/binding.h" | 11 #include "mojo/public/cpp/bindings/binding.h" |
| 12 | 12 |
| 13 // Handles method calls delegated back to chrome from ash. Also notifies ash of | 13 // Handles method calls delegated back to chrome from ash. Also notifies ash of |
| 14 // relevant state changes in chrome. | 14 // relevant state changes in chrome. |
| 15 // TODO: Consider renaming this to SystemTrayClientChromeOS. |
| 15 class SystemTrayClient : public ash::mojom::SystemTrayClient, | 16 class SystemTrayClient : public ash::mojom::SystemTrayClient, |
| 16 public chromeos::system::SystemClockObserver { | 17 public chromeos::system::SystemClockObserver { |
| 17 public: | 18 public: |
| 18 SystemTrayClient(); | 19 SystemTrayClient(); |
| 19 ~SystemTrayClient() override; | 20 ~SystemTrayClient() override; |
| 20 | 21 |
| 21 static SystemTrayClient* Get(); | 22 static SystemTrayClient* Get(); |
| 22 | 23 |
| 23 private: | 24 private: |
| 24 // Connects or reconnects the |system_tray_| interface. | 25 // Connects or reconnects the |system_tray_| interface. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 45 // chromeos::system::SystemClockObserver: | 46 // chromeos::system::SystemClockObserver: |
| 46 void OnSystemClockChanged(chromeos::system::SystemClock* clock) override; | 47 void OnSystemClockChanged(chromeos::system::SystemClock* clock) override; |
| 47 | 48 |
| 48 // System tray mojo service in ash. | 49 // System tray mojo service in ash. |
| 49 ash::mojom::SystemTrayPtr system_tray_; | 50 ash::mojom::SystemTrayPtr system_tray_; |
| 50 | 51 |
| 51 DISALLOW_COPY_AND_ASSIGN(SystemTrayClient); | 52 DISALLOW_COPY_AND_ASSIGN(SystemTrayClient); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ | 55 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_CLIENT_H_ |
| OLD | NEW |