| 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 ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ | 5 #ifndef ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ |
| 6 #define ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ | 6 #define ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "ash/common/system/tray/default_system_tray_delegate.h" | 10 #include "ash/common/system/tray/default_system_tray_delegate.h" |
| 9 #include "ash/public/interfaces/system_tray.mojom.h" | 11 #include "ash/public/interfaces/system_tray.mojom.h" |
| 10 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
| 11 #include "base/macros.h" | 13 #include "base/macros.h" |
| 12 | 14 |
| 13 namespace shell { | 15 namespace shell { |
| 14 class Connector; | 16 class Connector; |
| 15 } | 17 } |
| 16 | 18 |
| 17 namespace ash { | 19 namespace ash { |
| 18 | 20 |
| 21 class NetworkingConfigDelegate; |
| 22 class VPNDelegate; |
| 23 |
| 19 // Handles the settings displayed in the system tray menu. For mus most settings | 24 // Handles the settings displayed in the system tray menu. For mus most settings |
| 20 // are obtained from chrome browser via mojo IPC. For the classic ash version | 25 // are obtained from chrome browser via mojo IPC. For the classic ash version |
| 21 // see SystemTrayDelegateChromeOS. | 26 // see SystemTrayDelegateChromeOS. |
| 22 // | 27 // |
| 28 // Chrome OS only. Other platforms use DefaultSystemTrayDelegate directly. |
| 29 // |
| 23 // TODO: Support all methods in SystemTrayDelegate. http://crbug.com/647412. | 30 // TODO: Support all methods in SystemTrayDelegate. http://crbug.com/647412. |
| 24 class SystemTrayDelegateMus : public DefaultSystemTrayDelegate, | 31 class SystemTrayDelegateMus : public DefaultSystemTrayDelegate, |
| 25 public mojom::SystemTray { | 32 public mojom::SystemTray { |
| 26 public: | 33 public: |
| 27 explicit SystemTrayDelegateMus(shell::Connector* connector); | 34 explicit SystemTrayDelegateMus(shell::Connector* connector); |
| 28 ~SystemTrayDelegateMus() override; | 35 ~SystemTrayDelegateMus() override; |
| 29 | 36 |
| 30 static SystemTrayDelegateMus* Get(); | 37 static SystemTrayDelegateMus* Get(); |
| 31 | 38 |
| 32 private: | 39 private: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 47 void ShowChromeSlow() override; | 54 void ShowChromeSlow() override; |
| 48 void ShowIMESettings() override; | 55 void ShowIMESettings() override; |
| 49 void ShowHelp() override; | 56 void ShowHelp() override; |
| 50 void ShowAccessibilityHelp() override; | 57 void ShowAccessibilityHelp() override; |
| 51 void ShowAccessibilitySettings() override; | 58 void ShowAccessibilitySettings() override; |
| 52 void ShowPaletteHelp() override; | 59 void ShowPaletteHelp() override; |
| 53 void ShowPaletteSettings() override; | 60 void ShowPaletteSettings() override; |
| 54 void ShowPublicAccountInfo() override; | 61 void ShowPublicAccountInfo() override; |
| 55 void ShowEnterpriseInfo() override; | 62 void ShowEnterpriseInfo() override; |
| 56 void ShowProxySettings() override; | 63 void ShowProxySettings() override; |
| 64 NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override; |
| 65 VPNDelegate* GetVPNDelegate() const override; |
| 57 | 66 |
| 58 // mojom::SystemTray: | 67 // mojom::SystemTray: |
| 59 void SetUse24HourClock(bool use_24_hour) override; | 68 void SetUse24HourClock(bool use_24_hour) override; |
| 60 | 69 |
| 61 // May be null in unit tests. | 70 // May be null in unit tests. |
| 62 shell::Connector* connector_; | 71 shell::Connector* connector_; |
| 63 | 72 |
| 64 // Client interface in chrome browser. | 73 // Client interface in chrome browser. |
| 65 mojom::SystemTrayClientPtr system_tray_client_; | 74 mojom::SystemTrayClientPtr system_tray_client_; |
| 66 | 75 |
| 67 // 12 or 24 hour display. | 76 // 12 or 24 hour display. |
| 68 base::HourClockType hour_clock_type_; | 77 base::HourClockType hour_clock_type_; |
| 69 | 78 |
| 79 std::unique_ptr<NetworkingConfigDelegate> networking_config_delegate_; |
| 80 std::unique_ptr<VPNDelegate> vpn_delegate_; |
| 81 |
| 70 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateMus); | 82 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateMus); |
| 71 }; | 83 }; |
| 72 | 84 |
| 73 } // namespace ash | 85 } // namespace ash |
| 74 | 86 |
| 75 #endif // ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ | 87 #endif // ASH_MUS_SYSTEM_TRAY_DELEGATE_MUS_H_ |
| OLD | NEW |