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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/system/user/login_status.h" | 9 #include "ash/system/user/login_status.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
12 | 12 |
13 class SkBitmap; | 13 class SkBitmap; |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 | 16 |
17 struct NetworkIconInfo { | 17 struct NetworkIconInfo { |
18 SkBitmap image; | 18 SkBitmap image; |
19 string16 name; | 19 string16 name; |
20 string16 description; | 20 string16 description; |
| 21 std::string unique_id; |
21 }; | 22 }; |
22 | 23 |
23 class SystemTrayDelegate { | 24 class SystemTrayDelegate { |
24 public: | 25 public: |
25 virtual ~SystemTrayDelegate() {} | 26 virtual ~SystemTrayDelegate() {} |
26 | 27 |
27 // Gets information about the logged in user. | 28 // Gets information about the logged in user. |
28 virtual const std::string GetUserDisplayName() const = 0; | 29 virtual const std::string GetUserDisplayName() const = 0; |
29 virtual const std::string GetUserEmail() const = 0; | 30 virtual const std::string GetUserEmail() const = 0; |
30 virtual const SkBitmap& GetUserImage() const = 0; | 31 virtual const SkBitmap& GetUserImage() const = 0; |
31 virtual user::LoginStatus GetUserLoginStatus() const = 0; | 32 virtual user::LoginStatus GetUserLoginStatus() const = 0; |
32 | 33 |
33 // Shows settings. | 34 // Shows settings. |
34 virtual void ShowSettings() = 0; | 35 virtual void ShowSettings() = 0; |
35 | 36 |
36 // Shows the settings related to date, timezone etc. | 37 // Shows the settings related to date, timezone etc. |
37 virtual void ShowDateSettings() = 0; | 38 virtual void ShowDateSettings() = 0; |
38 | 39 |
| 40 // Show the settings related to network. |
| 41 virtual void ShowNetworkSettings() = 0; |
| 42 |
39 // Shows help. | 43 // Shows help. |
40 virtual void ShowHelp() = 0; | 44 virtual void ShowHelp() = 0; |
41 | 45 |
42 // Is the system audio muted? | 46 // Is the system audio muted? |
43 virtual bool IsAudioMuted() const = 0; | 47 virtual bool IsAudioMuted() const = 0; |
44 | 48 |
45 // Mutes/Unmutes the audio system. | 49 // Mutes/Unmutes the audio system. |
46 virtual void SetAudioMuted(bool muted) = 0; | 50 virtual void SetAudioMuted(bool muted) = 0; |
47 | 51 |
48 // Gets the volume level. | 52 // Gets the volume level. |
49 virtual float GetVolumeLevel() const = 0; | 53 virtual float GetVolumeLevel() const = 0; |
50 | 54 |
51 // Sets the volume level. | 55 // Sets the volume level. |
52 virtual void SetVolumeLevel(float level) = 0; | 56 virtual void SetVolumeLevel(float level) = 0; |
53 | 57 |
54 // Attempts to shut down the system. | 58 // Attempts to shut down the system. |
55 virtual void ShutDown() = 0; | 59 virtual void ShutDown() = 0; |
56 | 60 |
57 // Attempts to sign out the user. | 61 // Attempts to sign out the user. |
58 virtual void SignOut() = 0; | 62 virtual void SignOut() = 0; |
59 | 63 |
60 // Attempts to lock the screen. | 64 // Attempts to lock the screen. |
61 virtual void RequestLockScreen() = 0; | 65 virtual void RequestLockScreen() = 0; |
62 | 66 |
63 // Returns information about the most relevant network. Relevance is | 67 // Returns information about the most relevant network. Relevance is |
64 // determined by the implementor (e.g. a connecting network may be more | 68 // determined by the implementor (e.g. a connecting network may be more |
65 // relevant over a connected network etc.) | 69 // relevant over a connected network etc.) |
66 virtual NetworkIconInfo GetMostRelevantNetworkIcon() = 0; | 70 virtual NetworkIconInfo GetMostRelevantNetworkIcon(bool large) = 0; |
| 71 |
| 72 // Returns information about the available networks. |
| 73 virtual void GetAvailableNetworks(std::vector<NetworkIconInfo>* list) = 0; |
| 74 |
| 75 // Connects to the network specified by the unique id. |
| 76 virtual void ConnectToNetwork(const std::string& network_id) = 0; |
| 77 |
| 78 // Toggles airplane mode. |
| 79 virtual void ToggleAirplaneMode() = 0; |
| 80 |
| 81 // Shows UI for changing proxy settings. |
| 82 virtual void ChangeProxySettings() = 0; |
67 }; | 83 }; |
68 | 84 |
69 } // namespace ash | 85 } // namespace ash |
70 | 86 |
71 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 87 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
OLD | NEW |