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_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ |
6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/public/interfaces/system_tray.mojom.h" | 8 #include "ash/public/interfaces/system_tray.mojom.h" |
9 #include "base/i18n/time_formatting.h" | 9 #include "base/i18n/time_formatting.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Only connects to the actual mojom::SystemTrayClient interface when running on | 27 // Only connects to the actual mojom::SystemTrayClient interface when running on |
28 // Chrome OS. In tests and on Windows all operations are no-ops. | 28 // Chrome OS. In tests and on Windows all operations are no-ops. |
29 // | 29 // |
30 // TODO: Consider renaming this to SystemTrayClient or renaming the current | 30 // TODO: Consider renaming this to SystemTrayClient or renaming the current |
31 // SystemTray to SystemTrayView and making this class SystemTray. | 31 // SystemTray to SystemTrayView and making this class SystemTray. |
32 class SystemTrayController : public mojom::SystemTray { | 32 class SystemTrayController : public mojom::SystemTray { |
33 public: | 33 public: |
34 explicit SystemTrayController(shell::Connector* connector); | 34 explicit SystemTrayController(shell::Connector* connector); |
35 ~SystemTrayController() override; | 35 ~SystemTrayController() override; |
36 | 36 |
| 37 base::HourClockType hour_clock_type() const { return hour_clock_type_; } |
| 38 |
37 // Wrappers around the mojom::SystemTrayClient interface. | 39 // Wrappers around the mojom::SystemTrayClient interface. |
38 base::HourClockType hour_clock_type() const { return hour_clock_type_; } | 40 void ShowSettings(); |
39 void ShowDateSettings(); | 41 void ShowDateSettings(); |
| 42 void ShowDisplaySettings(); |
| 43 void ShowPowerSettings(); |
| 44 void ShowChromeSlow(); |
| 45 void ShowIMESettings(); |
| 46 void ShowHelp(); |
| 47 void ShowAccessibilityHelp(); |
| 48 void ShowAccessibilitySettings(); |
| 49 void ShowPaletteHelp(); |
| 50 void ShowPaletteSettings(); |
| 51 void ShowPublicAccountInfo(); |
| 52 void ShowProxySettings(); |
40 | 53 |
41 // Binds the mojom::SystemTray interface to this object. | 54 // Binds the mojom::SystemTray interface to this object. |
42 void BindRequest(mojom::SystemTrayRequest request); | 55 void BindRequest(mojom::SystemTrayRequest request); |
43 | 56 |
44 private: | 57 private: |
45 // Connects or reconnects to the mojom::SystemTrayClient interface when | 58 // Connects or reconnects to the mojom::SystemTrayClient interface when |
46 // running on Chrome OS. Otherwise does nothing. Returns true if connected. | 59 // running on Chrome OS. Otherwise does nothing. Returns true if connected. |
47 bool ConnectToSystemTrayClient(); | 60 bool ConnectToSystemTrayClient(); |
48 | 61 |
49 // Handles errors on the |system_tray_client_| interface connection. | 62 // Handles errors on the |system_tray_client_| interface connection. |
(...skipping 13 matching lines...) Expand all Loading... |
63 | 76 |
64 // The type of clock hour display: 12 or 24 hour. | 77 // The type of clock hour display: 12 or 24 hour. |
65 base::HourClockType hour_clock_type_; | 78 base::HourClockType hour_clock_type_; |
66 | 79 |
67 DISALLOW_COPY_AND_ASSIGN(SystemTrayController); | 80 DISALLOW_COPY_AND_ASSIGN(SystemTrayController); |
68 }; | 81 }; |
69 | 82 |
70 } // namspace ash | 83 } // namspace ash |
71 | 84 |
72 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ | 85 #endif // ASH_COMMON_SYSTEM_TRAY_SYSTEM_TRAY_CONTROLLER_H_ |
OLD | NEW |