OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
12 #include "ash/system/power/power_supply_status.h" | 12 #include "ash/system/power/power_supply_status.h" |
13 #include "ash/system/user/login_status.h" | 13 #include "ash/system/user/login_status.h" |
14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
15 #include "base/i18n/time_formatting.h" | 15 #include "base/i18n/time_formatting.h" |
| 16 #include "base/memory/scoped_ptr.h" |
16 #include "base/string16.h" | 17 #include "base/string16.h" |
17 #include "ui/gfx/image/image_skia.h" | 18 #include "ui/gfx/image/image_skia.h" |
18 | 19 |
19 namespace ash { | 20 namespace ash { |
20 | 21 |
21 struct ASH_EXPORT NetworkIconInfo { | 22 struct ASH_EXPORT NetworkIconInfo { |
22 NetworkIconInfo(); | 23 NetworkIconInfo(); |
23 ~NetworkIconInfo(); | 24 ~NetworkIconInfo(); |
24 | 25 |
25 bool highlight; | 26 bool highlight; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 90 |
90 bool selected; | 91 bool selected; |
91 bool third_party; | 92 bool third_party; |
92 std::string id; | 93 std::string id; |
93 string16 name; | 94 string16 name; |
94 string16 short_name; | 95 string16 short_name; |
95 }; | 96 }; |
96 | 97 |
97 typedef std::vector<IMEInfo> IMEInfoList; | 98 typedef std::vector<IMEInfo> IMEInfoList; |
98 | 99 |
| 100 class VolumeControlDelegate; |
| 101 |
99 class SystemTrayDelegate { | 102 class SystemTrayDelegate { |
100 public: | 103 public: |
101 virtual ~SystemTrayDelegate() {} | 104 virtual ~SystemTrayDelegate() {} |
102 | 105 |
103 // Returns true if system tray should be visible on startup. | 106 // Returns true if system tray should be visible on startup. |
104 virtual bool GetTrayVisibilityOnStartup() = 0; | 107 virtual bool GetTrayVisibilityOnStartup() = 0; |
105 | 108 |
106 // Gets information about the logged in user. | 109 // Gets information about the logged in user. |
107 virtual const string16 GetUserDisplayName() const = 0; | 110 virtual const string16 GetUserDisplayName() const = 0; |
108 virtual const std::string GetUserEmail() const = 0; | 111 virtual const std::string GetUserEmail() const = 0; |
(...skipping 26 matching lines...) Expand all Loading... |
135 | 138 |
136 // Shows settings related to Google Drive. | 139 // Shows settings related to Google Drive. |
137 virtual void ShowDriveSettings() = 0; | 140 virtual void ShowDriveSettings() = 0; |
138 | 141 |
139 // Shows settings related to input methods. | 142 // Shows settings related to input methods. |
140 virtual void ShowIMESettings() = 0; | 143 virtual void ShowIMESettings() = 0; |
141 | 144 |
142 // Shows help. | 145 // Shows help. |
143 virtual void ShowHelp() = 0; | 146 virtual void ShowHelp() = 0; |
144 | 147 |
145 // Is the system audio muted? | |
146 virtual bool IsAudioMuted() const = 0; | |
147 | |
148 // Mutes/Unmutes the audio system. | |
149 virtual void SetAudioMuted(bool muted) = 0; | |
150 | |
151 // Gets the volume level. The range is [0, 1.0]. | |
152 virtual float GetVolumeLevel() const = 0; | |
153 | |
154 // Sets the volume level. The range is [0, 1.0]. | |
155 virtual void SetVolumeLevel(float level) = 0; | |
156 | |
157 // Gets whether the caps lock is on. | 148 // Gets whether the caps lock is on. |
158 virtual bool IsCapsLockOn() const = 0; | 149 virtual bool IsCapsLockOn() const = 0; |
159 | 150 |
160 // Sets the caps lock status to |enabled|. | 151 // Sets the caps lock status to |enabled|. |
161 virtual void SetCapsLockEnabled(bool enabled) = 0; | 152 virtual void SetCapsLockEnabled(bool enabled) = 0; |
162 | 153 |
163 // Attempts to shut down the system. | 154 // Attempts to shut down the system. |
164 virtual void ShutDown() = 0; | 155 virtual void ShutDown() = 0; |
165 | 156 |
166 // Attempts to sign out the user. | 157 // Attempts to sign out the user. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // Note: |setup_url| is returned when carrier is not defined (no SIM card). | 262 // Note: |setup_url| is returned when carrier is not defined (no SIM card). |
272 virtual bool GetCellularCarrierInfo(std::string* carrier_id, | 263 virtual bool GetCellularCarrierInfo(std::string* carrier_id, |
273 std::string* topup_url, | 264 std::string* topup_url, |
274 std::string* setup_url) = 0; | 265 std::string* setup_url) = 0; |
275 | 266 |
276 // Opens the cellular network specific URL. | 267 // Opens the cellular network specific URL. |
277 virtual void ShowCellularURL(const std::string& url) = 0; | 268 virtual void ShowCellularURL(const std::string& url) = 0; |
278 | 269 |
279 // Shows UI for changing proxy settings. | 270 // Shows UI for changing proxy settings. |
280 virtual void ChangeProxySettings() = 0; | 271 virtual void ChangeProxySettings() = 0; |
| 272 |
| 273 // Returns VolumeControlDelegate. |
| 274 virtual VolumeControlDelegate* GetVolumeControlDelegate() const = 0; |
| 275 |
| 276 // Sets VolumeControlDelegate. |
| 277 virtual void SetVolumeControlDelegate( |
| 278 scoped_ptr<VolumeControlDelegate> delegate) = 0; |
| 279 |
281 }; | 280 }; |
282 | 281 |
283 } // namespace ash | 282 } // namespace ash |
284 | 283 |
285 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 284 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
OLD | NEW |