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